DAX Cumulative total measure efficiency

dicken

Active Member
Joined
Feb 12, 2022
Messages
292
Office Version
  1. 365
Platform
  1. Windows
Hi,
I've used a running total but it could apply to other things; are there advantages or more importantly disadvantages to the following measures;

Excel Formula:
RMT_A:=VAR ddate = MAX( Calendar1[Date]) 
RETURN
CALCULATE( [Tunits] , FILTER( ALL( 'Calendar1'[Date]), 'Calendar1'[Date] <= ddate ) )

Excel Formula:
RTM_B:=VAR ddate = MAX( Calendar1[Date]) 
RETURN
SUMX( FILTER( ALL( 'Calendar1'[Date]), 'Calendar1'[Date] <= ddate) ,[Tunits])

Excel Formula:
RTM_C:=VAR ddate = MAX( Calendar1[Date]) 
RETURN
SUMX(CALCULATETABLE( VALUES( 'Calendar1'[Date]), 'Calendar1'[Date] <= ddate),[Tunits])

just curious as to if there is much difference?

Richard
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
They are all technically sound. The first is the most common usage. To identify which is the most efficient, you would need to use something like DAX Studio to test the performance. It is possible they are identical, but you would have to check.

Read about “item 4” in this article on my website
 
Upvote 0
Solution
Thanks, as you said the first is what I'd go for, I was just curious,

Richard.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,128
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top