Forum Discussion
Pie Chart filter that can be filtered
Hello PBI Wizards,
I would like to ask your help please? I'm trying to create Pie chart that after choosing an Organization from that you can use another filter to compare the whole Organization VS a specific Location. Im not sure if this is possible. Here is an example:
| Organization | Location | Requests |
| Client_A | Client_A_North | 200 |
| Client_A | Client_A_East | 365 |
| Client_A | Client_A_West | 633 |
| Client_B | Client_B_North | 152 |
| Client_B | Client_B_South | 76 |
| Client_C | Client_C_East | 233 |
| Client_D | Client_D_West | 98 |
| Client_D | Client_D_East | 557 |
| Client_D | Client_D_South | 415 |
- Anonymous4 years ago
Hi atjt217 ,
According to your screenshot, Location and Organization are in two columns. So when you create a measure, they will in two different levels. As far as I know, Location and Organization should in same level. Here I suggest you to create a new calculated table with Location and Organization in same column to create the Pie chart.
Table 2 = VAR _TABLE1 = SELECTCOLUMNS('Table',"Selection",'Table'[Organization],"Requests",'Table'[Requests]) VAR _TABLE2 = SELECTCOLUMNS('Table',"Selection",'Table'[Location],"Requests",'Table'[Requests]) RETURN UNION(_TABLE1,_TABLE2)Dim table for slicer:
DimLocation = VALUES('Table'[Location])DimOrganition = VALUES('Table'[Organization])Measure:
Measure = VAR _Location = VALUES(DimLocation[Location]) VAR _Organition = VALUES(DimOrganition[Organization]) RETURN IF(MAX('Table 2'[Selection]) IN _Location || MAX('Table 2'[Selection]) IN _Organition, CALCULATE(SUM('Table 2'[Requests])))Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- atjt217
Helper III
Yes they are
- AnonymousNot applicable
Hi atjt217 ,
According to your screenshot, Location and Organization are in two columns. So when you create a measure, they will in two different levels. As far as I know, Location and Organization should in same level. Here I suggest you to create a new calculated table with Location and Organization in same column to create the Pie chart.
Table 2 = VAR _TABLE1 = SELECTCOLUMNS('Table',"Selection",'Table'[Organization],"Requests",'Table'[Requests]) VAR _TABLE2 = SELECTCOLUMNS('Table',"Selection",'Table'[Location],"Requests",'Table'[Requests]) RETURN UNION(_TABLE1,_TABLE2)Dim table for slicer:
DimLocation = VALUES('Table'[Location])DimOrganition = VALUES('Table'[Organization])Measure:
Measure = VAR _Location = VALUES(DimLocation[Location]) VAR _Organition = VALUES(DimOrganition[Organization]) RETURN IF(MAX('Table 2'[Selection]) IN _Location || MAX('Table 2'[Selection]) IN _Organition, CALCULATE(SUM('Table 2'[Requests])))Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- atjt217
Helper III
Thank you Rico! 😁