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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors