Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table like this:
Month | Cat1 | Cat2 | Cat3 |
Jan | 10 | 20 | 15 |
Feb | 20 | 25 | 20 |
Mar | 15 | 30 | 20 |
Apr | 25 | 10 | 30 |
May | 40 | 25 | 35 |
Would like to create a pie chart usig row Month of May, like this:
Is it possible to do dynamically? Since my data model is already complex, cant pivot the data while loading.
Check out the valuelist function, create a list of synthetic values for your dimension, and from them return your measure values.
My example according to your data looks like this:
https://help.qlik.com/en-US/sense/May2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SyntheticD...
=ValueList('CAT1','CAT2','CAT3')
As a preference, using the pick function with match, I return the measure according to the sequence of listed values. Note that you can also achieve the same result using the if function:
pick(match(ValueList('CAT1','CAT2','CAT3'),'CAT1','CAT2','CAT3'), sum({<Month={'May'}>}Cat1), sum({<Month={'May'}>}Cat2), sum({<Month={'May'}>}Cat3))
See that I did it according to your data, so the value for May is fixed. I hope this helps you achieve your result.
- Regards Matheus
Check out the valuelist function, create a list of synthetic values for your dimension, and from them return your measure values.
My example according to your data looks like this:
https://help.qlik.com/en-US/sense/May2024/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/SyntheticD...
=ValueList('CAT1','CAT2','CAT3')
As a preference, using the pick function with match, I return the measure according to the sequence of listed values. Note that you can also achieve the same result using the if function:
pick(match(ValueList('CAT1','CAT2','CAT3'),'CAT1','CAT2','CAT3'), sum({<Month={'May'}>}Cat1), sum({<Month={'May'}>}Cat2), sum({<Month={'May'}>}Cat3))
See that I did it according to your data, so the value for May is fixed. I hope this helps you achieve your result.
- Regards Matheus
@AsifRahman If you want to do it dynamically, it is better to convert your data into properly structured data using crosstable approach
Thanks man. Worked like a charm!