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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Cumulative Measure issue with Direct Query Mode

Hi Expert

 

How do you get around the following issue when writing cumulative measures in Direct Query Mode....

See image

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

Here are the Measures in Question - Measures 

 
1.
Cumulative Today =
CALCULATE (
[Total Sales],
FILTER (
ALLSELECTED ( FACTSalesOrderTable ),
FACTSalesOrderTable[created_at_sales_flat_order] <=max ( FACTSalesOrderTable[created_at_sales_flat_order] )
)
)
 
 
2.
Cumulative Previous Weeks =
CALCULATE(
[Previous Weeks],
FILTER(
ALLSELECTED('FACTSalesOrderTable'[created_hour]),
ISONORAFTER('FACTSalesOrderTable'[created_hour], MAX('FACTSalesOrderTable'[created_hour]), DESC)
)
)
 
3.
Cumulative Previous Year =
CALCULATE(
[Previous Year],
FILTER(
ALLSELECTED('FACTSalesOrderTable'[created_hour]),
ISONORAFTER('FACTSalesOrderTable'[created_hour], MAX('FACTSalesOrderTable'[created_hour]), DESC)
)
)
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , do some of these dates have timestamp, if that is not needed in the visual create date without timestamp and use those in meausre.Or Join Dates with the date of date table and try using date of date table in place of these dates in cumulative logic

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , do some of these dates have timestamp, if that is not needed in the visual create date without timestamp and use those in meausre.Or Join Dates with the date of date table and try using date of date table in place of these dates in cumulative logic

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amit Checking.....And how would the dates from the date table work?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors