Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have 6 measures against the X axis in a bar graph.
Is that possible for me to have two stacked bars in the graph , one with 3 measures and another also with 3 measures.
Or Can i have two dimensions in the graph . for example Region and Calendar Year, then have two measures. I see I can bring only one measure in this case.
Thanks,
Hi @jjustingkm !
Yes, you can do it combining ValueList() fuction and set analisys.
See the app attached!!
Thanks for looking into into it. The issue I have is there is one more dimension I need to add . For example, Country of Origin.
Hi @jjustingkm !
If you have to add another dimension, you have to do it wit ValueList() function.
If I understand it correctly, the value list function should add a dimension also. But, I don't see an option to add more than 2 dimensions in a graph. And also is it possible for you to paste the code here as I have some difficulty in opening the file.
Script:
[TAB1]:
Load * Inline [
Year, Region, Measure1, Measure2, Measure3, Measure4, Measure5, Measure6
2017, North, 10, 20, 30, 40, 20, 30
2018, North, 5, 15, 30, 25, 30, 15
2019, South, 20, 30, 15, 30, 20, 15
2020, South, 30, 30, 20, 15, 30, 30
2021, East, 15, 20, 30, 10, 15, 25
];
Dimension:
=ValueList('Region','Calendar Year')
You can add as many dimension as you want.
Measures
// South
if(ValueList('Region','Calendar Year')='Region', Sum({<Region = {'South'}>}Measure1))
// North
if(ValueList('Region','Calendar Year')='Region', Sum({<Region = {'North'}>}Measure1))
// East
if(ValueList('Region','Calendar Year')='Region', Sum({<Region = {'East'}>}Measure1))
// 2018
if(ValueList('Region','Calendar Year')='Calendar Year', Sum({<Year = {'2018'}>}Measure1))
//2019
if(ValueList('Region','Calendar Year')='Calendar Year', Sum({<Year = {'2019'}>}Measure1))
//2020
if(ValueList('Region','Calendar Year')='Calendar Year', Sum({<Year = {'2020'}>}Measure1))
//2021
if(ValueList('Region','Calendar Year')='Calendar Year', Sum({<Year = {'2021'}>}Measure1))