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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Tavi_
Frequent Visitor

Cumulative Cartons Forecasted

Hi,

I use this formula for the cumulative total of forecasted cartons.

_Forecast Cartons Cumulative = CALCULATE(
[_Forecast Cartons],
    FILTER(
        ALL('[DIM] Date'[Date]),
        '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]))
)
1111.png
 
But how do I adjust the formula so the formula starts counting from today? So my figures will look like this
2222.png
 
1 ACCEPTED SOLUTION

@Tavi_ OK, didn't understand that from the original post:

_Forecast Cartons Cumulative = 
VAR __Value = CALCULATE(
[_Forecast Cartons],
    FILTER(
        ALL('[DIM] Date'[Date]),
        '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]) && '[DIM] Date'[Date] >= TODAY() )
)
VAR __Result = IF( MAX('[DIM] Date'[Date]) < TODAY(), BLANK(), __Value )
RETURN
__Result


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

4 REPLIES 4
Tavi_
Frequent Visitor

@Khushidesai0109 your formula shows me this figures
1111.png

 

@Greg_Deckler your formula shows me this figures
3333.png

 

Both not the figures I'm looking for. De formula must ignore al the cartons before today. 

@Tavi_ OK, didn't understand that from the original post:

_Forecast Cartons Cumulative = 
VAR __Value = CALCULATE(
[_Forecast Cartons],
    FILTER(
        ALL('[DIM] Date'[Date]),
        '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]) && '[DIM] Date'[Date] >= TODAY() )
)
VAR __Result = IF( MAX('[DIM] Date'[Date]) < TODAY(), BLANK(), __Value )
RETURN
__Result


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...
Khushidesai0109
Super User
Super User

Hii You can use this DAX Instead
Forecast Cartons Cumulative =
CALCULATE (
[_Forecast Cartons],
FILTER (
ALLSELECTED ( '[DIM] Date'[Date] ),
'[DIM] Date'[Date] <= MAX ( '[DIM] Date'[Date] )
)
)

If this solution helped you please give a thumbs up and accept this reply as a solution!!
Thank You!! Regards!!
 



Proud to be a Super User!!
Greg_Deckler
Community Champion
Community Champion

@Tavi_ 

_Forecast Cartons Cumulative = 
VAR __Value = CALCULATE(
[_Forecast Cartons],
    FILTER(
        ALL('[DIM] Date'[Date]),
        '[DIM] Date'[Date] <= MAX ('[DIM] Date'[Date]))
)
VAR __Result = IF( MAX('[DIM] Date'[Date]) < TODAY(), BLANK(), __Value )
RETURN
__Result


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...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.