Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
atjt217
Helper III
Helper III

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:

 

atjt217_0-1657856296127.png

OrganizationLocationRequests
Client_AClient_A_North200
Client_AClient_A_East365
Client_AClient_A_West633
Client_BClient_B_North152
Client_BClient_B_South76
Client_CClient_C_East233
Client_DClient_D_West98
Client_DClient_D_East557
Client_DClient_D_South415
1 ACCEPTED SOLUTION

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.

RicoZhou_0-1658200014665.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
atjt217
Helper III
Helper III

Thank you Rico! 😁

Dhacd
Resolver III
Resolver III

@atjt217 
I believe this location and organization are two different columns right?

Yes they are

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.

RicoZhou_0-1658200014665.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.