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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AdamRobC
Helper II
Helper II

Calculating previous year revenue across product categories

Hi, I am trying to calculate last year revenue across product categories - the below DAX works for getting aggregated revenue for the previous year based on fiscal week, but just returns an aggregated total and does not split by category. Where am I going wrong?

 

LastYear Gross Revenue =
CALCULATE(
SUM(Range_data[Gross Revenue]),
FILTER(ALL(Range_data),
Range_data[Fiscal Year] = VALUES(Range_data[Fiscal Year]) - 1 && Range_data[Fiscal Week Number] = VALUES(Range_data[Fiscal Week Number])
)
)
1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

I guess that this

FILTER(ALL(Range_data)

add to the confusion, as this also removes an axisting filter from your category column.

Maybe you can give this a try:

FILTER(ALLEXCEPT('Range_data' , 'Range_data'[<category column>]) ...

Hopefully this provides you with some ideas,

 

Regards,

Tom

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

 

I guess that this

FILTER(ALL(Range_data)

add to the confusion, as this also removes an axisting filter from your category column.

Maybe you can give this a try:

FILTER(ALLEXCEPT('Range_data' , 'Range_data'[<category column>]) ...

Hopefully this provides you with some ideas,

 

Regards,

Tom

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks - that worked!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.