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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
bungle
Frequent Visitor

measures unaffected by slicer

I am trying to rectify an issue I have where a previous measure created has been hard coded to look for the period (H1 or H2) but is using a duplicated page with H1 measure being used for one page, H2 on another - twice the work updating anything and actually not dynamic for the person wanting the report.

ER H1 Forecast = CALCULATE(SUM('Data'[Unweighted]), FILTER(ALL('Data'[Account],'Data'[Week of Rally], Data[Semester]),'Data'[Account]="ER" && 'Data'[Week of Rally]="Week25" && Data[Semester]="H1"))/1000

 

For example, is used on the H1 page , incidentally i also don't like that the [Week of Rally]="Week25" is also used but as this number changes every week I'll have to live with that for a bit until i get to grips with how to filter out the first three values and only select the last.

In any case, as a quick and dirty change, I added a slider to the Semester column options of H1 and H2, and edited the DAX to:

ER Forecast = CALCULATE(SUM('Data'[Unweighted]), FILTER(ALL('Data'[Account], 'Data'[Semester]),'Data'[Account]="ER" ))


But regardless of whether I select H1 or H2 in the slicer, the metric value only ever shows the sum of both H1 and H2. I assumed the purpose of the slicer is to deconstruct the value you are looking for and only show the data for the selected option.

Am I missing something? I really want to get rid of all the hard coding but being fairly new to Power BI this has taken up far more of my time than I thought it would.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

The ALL is removing the filter from the semester column, which is why your slicer makes no difference. Try

ER Forecast =
CALCULATE (
    SUM ( 'Data'[Unweighted] ),
    FILTER ( ALL ( 'Data'[Account] ), 'Data'[Account] = "ER" )
)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

The ALL is removing the filter from the semester column, which is why your slicer makes no difference. Try

ER Forecast =
CALCULATE (
    SUM ( 'Data'[Unweighted] ),
    FILTER ( ALL ( 'Data'[Account] ), 'Data'[Account] = "ER" )
)

Such a simple thing, thank you so much!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.