Forum Discussion
uscmea
5 years agoFrequent Visitor
Cumulative Sum
Hi, I have three main measures in my data model: sales = DISTINCTCOUNT(Sales[Product ID]) leads = DISTINCTCOUNT(Leads[Lead ID]) conv = IF([vacation_days]<7,[sales]/[leads],0) The meas...
- 5 years ago
Try this measure:
cum_conv = VAR vCurrentMonth = MAX ( 'Calendar'[Month Number] ) VAR vTable = ADDCOLUMNS ( ALLSELECTED ( 'Calendar'[Month Number] ), "@conv", [conv] ) VAR vResult = SUMX ( vTable, IF ( 'Calendar'[Month Number] <= vCurrentMonth, [@conv] ) ) RETURN vResult
DataInsights
5 years agoSuper User
Try this measure:
cum_conv =
VAR vCurrentMonth =
MAX ( 'Calendar'[Month Number] )
VAR vTable =
ADDCOLUMNS ( ALLSELECTED ( 'Calendar'[Month Number] ), "@conv", [conv] )
VAR vResult =
SUMX ( vTable, IF ( 'Calendar'[Month Number] <= vCurrentMonth, [@conv] ) )
RETURN
vResult
uscmea
5 years agoFrequent Visitor
Thank you very much for your help, DataInsights !!