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
ScottTynan
Frequent Visitor

Finding the % difference in sales for a product compare to average of the last two years

Hello All, 

 

I have a dataset of invoice information FY21, FY22 and building up FY23 as we progress through. I need to assess line by line for the F23 data to find the average of the sales for the last two years compared this current period. 
I have a date table linked to this revenue table. 
Below image is a snip of what I currently have with what I am hoping to be able to produce added to the RHS. 
It needs to ignore any filters on the visuals, page and report.

ScottTynan_0-1659424207175.png

 

3 REPLIES 3
daXtreme
Solution Sage
Solution Sage

@ScottTynan 

 

As far as I remember, one cannot ignore filters on the page or/and report level. Not via DAX at least. When you design your reports, you should always be aware of this limitation (or a feature - depending on how you look at this).

This ignores all filters. 

Last Invoiced =
var cdate = MAX('Revenue by Period'[Date]) var _result =

CALCULATE(MAX('Revenue by Period'[Date]),'Revenue by Period'[Date]<cdate,ALL('Revenue by Period'[Date])) return

IF(ISBLANK(_result),"NA",_result)

@ScottTynan 

 

OK, I have googled for it. Yes, it looks like you can override page level filters in a DAX measure 🙂 Looks like my skills are getting a bit rusty 🙂

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.