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! Learn more

Reply
Ranjith_96
Helper I
Helper I

difference between my two DAX

Hi Power BI Community,

Please look at my image below ,

cumulative_sales = CALCULATE(SUM(Orders[Sales]),dim_date[Date]<= MAX(Orders[Order Date]))
I am calculating cumulative sales, which is working fine correctly when I have an relationship with dim_date table and orders table and if i use dim_date column in the formula.
Ranjith_96_0-1692525569095.png

But If I dont have a dim_date table, i am trying to use the order date itself inplace of dim_date,  like below , I am not getting the cumulative sum, I am getting the same value as of Total sales for every row,

cumulative_sales = CALCULATE(SUM(Orders[Sales]),Orders[Order Date]<= MAX(Orders[Order Date]))
Can someone explain me, why this is happening. Both the DAX are same only right? or is there any difference. I am trying to understand the difference between both the DAX and the concept behind it. Please help me in understanding it.
Thanks in Advance.
please find the URL of the pbix file for your reference,
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ranjith_96 , as you are using order_date in measure same date has to be used in visual as you are using row context in measure

cumulative_sales1 = CALCULATE(SUM(Orders[Sales]),Orders[Order Date] <= MAX(Orders[Order Date]))

amitchandak_0-1692671183924.png

 

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

@Ranjith_96 , as you are using order_date in measure same date has to be used in visual as you are using row context in measure

cumulative_sales1 = CALCULATE(SUM(Orders[Sales]),Orders[Order Date] <= MAX(Orders[Order Date]))

amitchandak_0-1692671183924.png

 

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

Thanks much @amitchandak for your response.

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