Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Dears,
Please advise on the issue below.
I have created 3 measures in order to display the % change of sales when selecting a year and it goes like this:
1) I've created a measure to calculate total sales: Total Selected Sales = sum('to'[Turnover])
2) I've created a measure to calculate Prior Year Sales:
Prior Year Sales =
VAR
selectedYear = if( HASONEVALUE('DateKey'[year]),
FIRSTNONBLANK(DateKey[year],DateKey[year]),
BLANK() )-1
Return
CALCULATE(
SUM('to'[Turnover]),
ALL('to'),
DateKey[year] = selectedYear)
3) A measure which displays the increare/decrease in %: Percent Change = DIVIDE([Total Selected Sales],[Prior Year Sales],1)-1
Everything works fine when i'm applying a Year filter as you can see below.
When i'm also applying a filter to a lowest level, (brand), to check the sales for a specific shop in a shopping mall, the Prior Year Sales remains the same.
I can't understand why Prior Year Sales doesn't apply to the Brand level (the information is in the same table, it's not a relationship problem).
Any ideas?
BR,
Andrei
Solved! Go to Solution.
In your CALCULATE function call, the “ALL(‘to’)” is blocking the filter on Brand. From what I see it should be removed.
In your CALCULATE function call, the “ALL(‘to’)” is blocking the filter on Brand. From what I see it should be removed.
On second thought, it works.
My mistake!
thanks a lot!
Hi Matt,
Thanks for your reply.
Tried removing it, still having the same result.
thanks
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 85 | |
| 69 | |
| 38 | |
| 29 | |
| 27 |