Forum Discussion
Cumulative Count Not working as expected
- 5 years ago
SergioTorrinha , Not very clear.
Try like
calculate(counrows(facOrders), filter(allselcted(facOrders) , facOrders[CreationDate] <=Max(facOrders[CreationDate])))
or
calculate(counrows(facOrders), filter(allselcted(facOrders) , facOrders[CreationDate] <=Max(facOrders[CreationDate]) && facOrders[CustomerID] <=Max(facOrders[CustomerID])))
SergioTorrinha , Not very clear.
Try like
calculate(counrows(facOrders), filter(allselcted(facOrders) , facOrders[CreationDate] <=Max(facOrders[CreationDate])))
or
calculate(counrows(facOrders), filter(allselcted(facOrders) , facOrders[CreationDate] <=Max(facOrders[CreationDate]) && facOrders[CustomerID] <=Max(facOrders[CustomerID])))
Hi amitchandak !
Thank you for your feedback.
I managed to make it work properly, with the following adaptation of your first DAX:
a_test =
CALCULATE(
DISTINCTCOUNT(facOrders[CustomerID]),
FILTER( ALLSELECTED(facOrders) , facOrders[CreationDate] <= Max(dimDates[DateID])) //Max(facOrders[CreationDate]))
)
Thank you for your help! 🙂