Forum Discussion
Anonymous
5 years agoNot applicable
Card last date
Hello friends, I need to do a card (measure), which updates every day with the current date independent to have a date filter on report. in short, I need to make a measure with the last date...
- 4 years ago
Anonymous Hence why I did not recommend having MAX in your CALCULATE and instead use a separate measure. You can also do this:
Total Defeito = VAR __Max = MAX(Log_Bateria[Data]) RETURN calculate( DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito", Log_Bateria[Data] = __Max) + 0
Greg_Deckler
5 years agoCommunity Champion
Anonymous Just create a new measure with that formula. Then you could adjust your formula to be something like:
Total Defeito = CALCULATE(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito", 'Table'[Date]=[Max date measure]) + 0Anonymous
5 years agoNot applicable
My data table is " Log_bateria[Data]"
I used :
Total Defeito = calculate(
DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito",
Log_Bateria[Data] = MAX(Log_Bateria[Data])) + 0
and return to me: A 'MAX' function was used in a True/False expression used as a table filter expression. This is not allowed.
Do you can help me?
- Greg_Deckler4 years agoCommunity Champion
Anonymous Hence why I did not recommend having MAX in your CALCULATE and instead use a separate measure. You can also do this:
Total Defeito = VAR __Max = MAX(Log_Bateria[Data]) RETURN calculate( DISTINCTCOUNT(Log_Bateria[Equipamentos]),Log_Bateria[Status1] = "Com Defeito", Log_Bateria[Data] = __Max) + 0- Anonymous4 years agoNot applicable