Forum Discussion
Anonymous
5 years agoNot applicable
Help with DAX
Hello, I'm trying to create a measure that shows the following: Rotulo_ano =
VAR AnoMax = CALCULATE(MAX('dCalendário'[Ano]),ALL('dCalendário'[Ano]))
VAR AnoSelec = CALCULATE(MAX('dCale...
- 5 years ago
Hi Anonymous
Use HASONEVALUE or SELECTEDVALUE in your code.
Try this measure:
Rotulo_ano = VAR AnoSelec = CALCULATE(MAX('dCalendário'[Ano])) return IF(HASONEVALUE('dCalendário'[Ano])," em " & AnoSelec," até " & AnoSelec,)If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your Kudos✌️!!
VahidDM
Super User
5 years agoHi Anonymous
Use HASONEVALUE or SELECTEDVALUE in your code.
Try this measure:
Rotulo_ano =
VAR AnoSelec = CALCULATE(MAX('dCalendário'[Ano]))
return
IF(HASONEVALUE('dCalendário'[Ano])," em " & AnoSelec," até " & AnoSelec,)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Appreciate your Kudos✌️!!