Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
The first two pie charts from the left is currently how my pie chart and slicer works:
The third pie chart (desired outcome) is what I want to achieve.
When I select a filter, I want the pie chart to show the filtered pie slice's percentage and number out of the total population.
How do I achieve this?
Solved! Go to Solution.
Hi @msuser48
Thanks for reaching out to us.
Here are 2 solutions.
(1) solution 1 --> create a legend table,
relationship
create a measure
Measure 2 =
var _sel=SELECTEDVALUE(slicer[Parameter])
var _count_total=COUNTX(ALL('Table'),[Name])
var _count_sel=COUNTX(FILTER(ALL('Table'),'Table'[Parameter]=_sel),[Name])
return IF(ISFILTERED(slicer[Parameter]),IF(MIN('legend'[Parameter])="Other",_count_total-_count_sel,IF(MIN('legend'[Parameter])=_sel,COUNTX('Table',[Name]))),COUNTX('Table',[Name]))
result
(2) solution 2 --> if you add one row in your table,
then, create a table below used in slicer
then create a measure and put it into pie chart
Measure =
var _sel=SELECTEDVALUE(slicer[Parameter])
var _count_total=COUNTX(ALL('Table'),[Name])
var _count_sel=COUNTX(FILTER(ALL('Table'),'Table'[Parameter]=_sel),[Name])
return IF(ISFILTERED(slicer[Parameter]),IF(MIN('Table'[Parameter])="Other",_count_total-_count_sel,IF(MIN('Table'[Parameter])=_sel,COUNTX('Table',[Name]))),COUNTX('Table',[Name]))
result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @msuser48
Thanks for reaching out to us.
Here are 2 solutions.
(1) solution 1 --> create a legend table,
relationship
create a measure
Measure 2 =
var _sel=SELECTEDVALUE(slicer[Parameter])
var _count_total=COUNTX(ALL('Table'),[Name])
var _count_sel=COUNTX(FILTER(ALL('Table'),'Table'[Parameter]=_sel),[Name])
return IF(ISFILTERED(slicer[Parameter]),IF(MIN('legend'[Parameter])="Other",_count_total-_count_sel,IF(MIN('legend'[Parameter])=_sel,COUNTX('Table',[Name]))),COUNTX('Table',[Name]))
result
(2) solution 2 --> if you add one row in your table,
then, create a table below used in slicer
then create a measure and put it into pie chart
Measure =
var _sel=SELECTEDVALUE(slicer[Parameter])
var _count_total=COUNTX(ALL('Table'),[Name])
var _count_sel=COUNTX(FILTER(ALL('Table'),'Table'[Parameter]=_sel),[Name])
return IF(ISFILTERED(slicer[Parameter]),IF(MIN('Table'[Parameter])="Other",_count_total-_count_sel,IF(MIN('Table'[Parameter])=_sel,COUNTX('Table',[Name]))),COUNTX('Table',[Name]))
result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@msuser48 , a Little bit of modeling is needed. Please find the attached file after the signature. Check there are two pies, one with the measure is what you need
User | Count |
---|---|
102 | |
90 | |
80 | |
71 | |
70 |
User | Count |
---|---|
114 | |
100 | |
97 | |
72 | |
68 |