The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Solved! Go to Solution.
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" )
)
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
80 | |
79 | |
47 | |
39 |
User | Count |
---|---|
149 | |
110 | |
66 | |
64 | |
56 |