Forum Discussion
awitt
4 years agoHelper III
SUMX / Date Range Question
I have a question I am trying to answer with multiple variables that is causing some challenges. I am wanting to sum the total orders only within a certain time frame for multiple customers. The...
- Anonymous4 years ago
Hi awitt ,
Create a measure like below.
measure = CALCULATE ( SUM ( 'table1'[sales] ), FILTER ( ALLSELECTED ( 'table1' ), 'table1'[customer] = SELECTEDVALUE ( 'table2'[customer] ) && 'table1'[date] >= SELECTEDVALUE ( 'table2'[start] ) && 'table1'[date] <= SELECTEDVALUE ( 'table2'[end] ) ) )Use 'table2'[customer], table2[start], 'table2'[end] and [measure] to create a visual.
Best Regards,
Jay
Anonymous
4 years agoNot applicable
Hi awitt ,
Create a measure like below.
measure =
CALCULATE (
SUM ( 'table1'[sales] ),
FILTER (
ALLSELECTED ( 'table1' ),
'table1'[customer] = SELECTEDVALUE ( 'table2'[customer] )
&& 'table1'[date] >= SELECTEDVALUE ( 'table2'[start] )
&& 'table1'[date] <= SELECTEDVALUE ( 'table2'[end] )
)
)
Use 'table2'[customer], table2[start], 'table2'[end] and [measure] to create a visual.
Best Regards,
Jay