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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Keep original filter context at moving average

Hi folks,

 

following issue:

 

I've got a KPI rendered in a weekly report. That was the easy part. It's displayed for all products that has been produced in the week of interest.

 

Now, to allow for judgement on KPI I like to compare it to a 12MTD average of the same KPI.

For this, I've used the known DATESINPERIOD in a CALCULATE on the previous efficiency measure:

 

Eff% 12MTD = CALCULATE([Eff%];DATESINPERIOD(Dates[Date];LASTDATE(Dates[Date]);-1;YEAR))

 

However, as soon, as I put this into a visual, all products show up - instead of just the ones of the respective week (see above).

What can I do to keep the filter on my products?

 

I tried various options on ALLEXCEPT / KEEPFILTER but was not successful.

 

Hope I can learn from you....

Thanks in advance.

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous,

 

Current dax formula not directly calculated on summarized/grouped level when you nested multiple measure formula, it will drill and calcualte on detail row level, then summary these result instead direct calculate on grouped level.

 

For this scenario, you need to add condition to check summary level and write a specific formula to manually summary records to get calculation result on total level.

 

Time Intelligence Without Date Columns in DAX

Optimizing DAX expressions involving multiple measures

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors