Forum Discussion
aisberg
6 years agoFrequent Visitor
DAX equivalent to PRODUCT() on a Measure in a variable context?
I need to calculate in a flexible context per day: A_prod(day 1) = A(day 1) A_prod(day 2) = A(day 1) * A(day 2) A_prod(day 3) = A(day 1) * A(day 2) * A(day 3) and so on. If [A] would be a ...
aisberg
6 years agoFrequent Visitor
y error was the wrong usage of ALLSELECTED
A good article is here: https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/
I did a test with COUNT and I understand my error, need to filter ALLSELECTED only the date filter, but not the table wich context is required.
TWR_PF_BW Test01 =
CALCULATE(
COUNT('MG_Datum_Mandant_Portfolio_GroupBy'[TWR_PF_BW]);
FILTER(
ALLSELECTED( 'Datum');
'Datum'[Datum] <= MAX('Datum'[Datum])
)
)