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 September 15. Request your voucher.

Reply
SonaliDhotre
Advocate I
Advocate I

Cumulative percentage not showing proper data when used date column from fact table on weekend

As mentioned in the subject, the cumulative percentage is showing correct data when the date column from the DimDate table is used, but incorrect data when the date column from the fact table is used.

 

When the date column is used from the Fact table

DAX:

 

 

Percentage Cumulated = 
TOTALMTD (
DIVIDE(SUM('Fact'[Shipped Quantity]),SUM('Fact'[Order Quantity]),0),
DATEADD ( DATESMTD (Fact[Date]), 0, DAY )
)

 

 

Screenshot:

SonaliDhotre_3-1640766540726.png
SonaliDhotre_4-1640766608057.png

 


Note: The date on XAxis is also from the Fact table

When the date column is used from the DimDate table

DAX:

 

 

 

Percentage Cumulated =
TOTALMTD (
DIVIDE(SUM('Fact'[Shipped Quantity]),SUM('Fact'[Order Quantity]),0),
DATEADD ( DATESMTD (DimDate[Date]), 0, DAY )
)

 

 

Screenshot:

SonaliDhotre_0-1640765924980.png

SonaliDhotre_2-1640766208031.png

 

Note: Date on XAxis is also from DimDate table

 

SonaliDhotre_0-1640767681776.png

 

 



Can anyone please tell me why this is happening?

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @SonaliDhotre ,

 

This is caused by the context of measure. In the two formulas you provided, the context is different. One is based on the DimDate table and the other is based on the date of the fact table. DATEADD is a time intelligence function.The result table includes only dates that exist in the dates column.


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@SonaliDhotre , You should use date table, Do you need MTD? YTD ? or cumulative

 

Percentage MTD =
calculate (
DIVIDE(SUM('Fact'[Shipped Quantity]),SUM('Fact'[Order Quantity]),0),
DATESMTD (Date[Date])
)

or
Percentage YTD=
calculate (
DIVIDE(SUM('Fact'[Shipped Quantity]),SUM('Fact'[Order Quantity]),0),
DATESYTD (Date[Date])
)

or
Percentage Cumulated =
calculate (
DIVIDE(SUM('Fact'[Shipped Quantity]),SUM('Fact'[Order Quantity]),0),
filter(allselected('Date'),'Date'[date] <=max('Date'[date]))
)

 

if this does not help

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI 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.