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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AnonymeC
Regular Visitor

DAX - Calculation of sum for current Fiscal Year

Hello,

 

I am trying to calculate the weight of the sales per quarter and half fiscal year (considering the whole FY). For that I want to divide the sales of the time period by the total sales of the FY.

 

To calculate the sales of the time period I just do :

=sum( 'Sales consolidated'[Sales $])

and then use my dates table in the pivot table to show the half and quarter.

 

The issue is with the total sales of the FY. After research I tried this formula :

=CALCULATE( sum( 'Sales consolidated'[Sales $]), FILTER( Dates, Dates[FY] = "FY23"))

 

I believed it worked but it doesn't, when I'm using it in my pivot I don't have the value of the whole fiscal year when I'm looking at quarter or half level (I have the correct value for the total though). I woul like to "freeze" this total value so I can use it when looking at quarter/half level to calculate the weight.

 

Hope it is clear, thanks a lot in advance.

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@AnonymeC Try:

Measure = CALCULATE( sum( 'Sales consolidated'[Sales $]), FILTER( ALL(Dates), Dates[FY] = "FY23"))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
AnonymeC
Regular Visitor

To give you a better idea the pivot table should look like this :

 Column labels        
 H1  H2  total (=Full FY)  
          
Row labelsSales $Total SalesWeightSales $Total SalesWeightSales $Total SalesWeight
Category A120002000060%80002000040%2000020000100%
Category B250005000050%250005000050%5000050000100%
Greg_Deckler
Community Champion
Community Champion

@AnonymeC Try:

Measure = CALCULATE( sum( 'Sales consolidated'[Sales $]), FILTER( ALL(Dates), Dates[FY] = "FY23"))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler It worked, thanks a lot!!

Have a nice day

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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