Forum Discussion
Using DAX in Visualisation
- 2 years ago
Hello holywasabi
please check if this accomodate your need.
I am not sure what kind of error did you get but if it works in table form, it should work as well in other visual
Apart from the error, please check these :
1. Created calculated column for 'Income (Grouped)'
Income (Grouped) = MAXX(FILTER('Supporting','Income'[Income]>'Supporting'[Min]&&'Income'[Income]<'Supporting'[Max]),'Supporting'[Income Range])2. Since you want to create pie chart with 'Income Range' as separator/legend, then you need to make a measure to calculate it. Create measure in 'Supporting' Table with following DAX for calculating number of row that has exact same value in 'Income (Grouped)' and 'Income Range'.
Count Customer =var _Income = SELECTEDVALUE('Supporting'[Income Range])var _Count = COUNTX(FILTER('Income','Income'[Income (Grouped)]=_Income),COUNTROWS('Income'))ReturnIF(_Count=BLANK(),0,_Count)3. Plot in pie chart, 'Income Range' as legend and the previous measure (Count Customer) as Values.
After putting values in pie chart, in Visual Format, turn of legend and change Label Content (Detail Label -> Option).
Also, in your screecshot table, you only provide two kind of data, the 10k-50k and 50k-100k. The rest of categories dont show up because the value is zero.
Hope this will help you.
Thank you.
Hello holywasabi
please check if this accomodate your need.
I am not sure what kind of error did you get but if it works in table form, it should work as well in other visual
Apart from the error, please check these :
1. Created calculated column for 'Income (Grouped)'
2. Since you want to create pie chart with 'Income Range' as separator/legend, then you need to make a measure to calculate it. Create measure in 'Supporting' Table with following DAX for calculating number of row that has exact same value in 'Income (Grouped)' and 'Income Range'.
3. Plot in pie chart, 'Income Range' as legend and the previous measure (Count Customer) as Values.
After putting values in pie chart, in Visual Format, turn of legend and change Label Content (Detail Label -> Option).
Also, in your screecshot table, you only provide two kind of data, the 10k-50k and 50k-100k. The rest of categories dont show up because the value is zero.
Hope this will help you.
Thank you.