Forum Discussion
Anonymous
3 years agoNot applicable
Help with dax measure
Hi team, Need help in figuring out the dax to calculate the sum of values for a given merchant with the start and end date. There are sales ouside the start and end date but need to caluclate...
- 3 years ago
Hi Anonymous
'Date' is a disconnected tableSales Amount = SUMX ( FILTER ( SaLes, Sales[Start] <= MAX ( 'Date'[Date] ) && Sales[End] >= MAX ( 'Date'[Date] ) ), Sales[Value] )If 'Date' is connected then try
Sales Amount = SUMX ( FILTER ( ALL ( SaLes ), Sales[Start] <= MAX ( 'Date'[Date] ) && Sales[End] >= MAX ( 'Date'[Date] ) ), Sales[Value] )
tamerj1
Community Champion
3 years agoHi Anonymous
'Date' is a disconnected table
Sales Amount =
SUMX (
FILTER (
SaLes,
Sales[Start] <= MAX ( 'Date'[Date] )
&& Sales[End] >= MAX ( 'Date'[Date] )
),
Sales[Value]
)
If 'Date' is connected then try
Sales Amount =
SUMX (
FILTER (
ALL ( SaLes ),
Sales[Start] <= MAX ( 'Date'[Date] )
&& Sales[End] >= MAX ( 'Date'[Date] )
),
Sales[Value]
)