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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Make measure filtered by slicer, and ignore X-axis filter (even they are the same column)

Hi, Thank you for looking at this issue, really appreciate anyone can help me to solve this issue. 

 

There is a slicer for examle called "city" which have 6 different cities. At the same time, i have a stacked bar chart which also puts "city" as X axis. 

 

Will filter and select 3 cities in the slicer. Then would like to get the accordingly 3 cities in this stacked bar chart but want to have one measure - # regions for these 3 cities in total rather than # regions for each city. That means this measure should be filtered by that slicer rather than X axis of the chart.

 

Please see the example: so ideally, i want slicer to control the chart, and accordingly get 3 cities but hope get # regions = 120 for all these 3 cities rather than like b

 

TableTableReportReport

 

 

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi siyue,

If you want to get total value based on slicer, you could try below measure

Measure =
CALCULATE (
    IF ( ISFILTERED ( TOTAL[Country] ), SUM ( TOTAL[amount] ), 0 ),
    ALLSELECTED ( TOTAL )
)

207.PNG

Best Regards,
Zoe Zhi

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

2 REPLIES 2
dax
Community Support
Community Support

Hi siyue,

If you want to get total value based on slicer, you could try below measure

Measure =
CALCULATE (
    IF ( ISFILTERED ( TOTAL[Country] ), SUM ( TOTAL[amount] ), 0 ),
    ALLSELECTED ( TOTAL )
)

207.PNG

Best Regards,
Zoe Zhi

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

Anonymous
Not applicable

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.