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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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

 

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

 

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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