Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Get the same results for every month of different years
what I get now is this using this measure :
What I wanna get is this the yellow values be repeated for every month the same result
this is possible ?
Solved! Go to Solution.
Hi @tatouis
This year Paye voyageur =
CALCULATE (
SUM ( 'Fichier le retour'[payé voyageur] ),
DATESBETWEEN (
'Calendar'[Date],
DATE ( YEAR ( TODAY () ), 01, 01 ),
DATE ( YEAR ( TODAY () ), 12, 31 )
)
)
The formula above is just another way of saying give me the the SUM ( 'Fichier le retour'[payé voyageur] ) for 2022 and let that sum be applied to the whole calendar table thus you're getting the 2022 total for every period in your visual. If you want to ge the sum for each month in 2022 and let that be applied to all months in the calendar table, you need to write your measure differently. Here's a sample formula as well as a screenshot of the result:
Current Year Value =
CALCULATE (
[Sum of Values],
FILTER ( ALL ( Dates[Year] ), Dates[Year] = YEAR ( TODAY () ) )
)
Please take note that I used a separate column for Year and Month and not the one from a date hierarchy.
Proud to be a Super User!
Hi @tatouis
This year Paye voyageur =
CALCULATE (
SUM ( 'Fichier le retour'[payé voyageur] ),
DATESBETWEEN (
'Calendar'[Date],
DATE ( YEAR ( TODAY () ), 01, 01 ),
DATE ( YEAR ( TODAY () ), 12, 31 )
)
)
The formula above is just another way of saying give me the the SUM ( 'Fichier le retour'[payé voyageur] ) for 2022 and let that sum be applied to the whole calendar table thus you're getting the 2022 total for every period in your visual. If you want to ge the sum for each month in 2022 and let that be applied to all months in the calendar table, you need to write your measure differently. Here's a sample formula as well as a screenshot of the result:
Current Year Value =
CALCULATE (
[Sum of Values],
FILTER ( ALL ( Dates[Year] ), Dates[Year] = YEAR ( TODAY () ) )
)
Please take note that I used a separate column for Year and Month and not the one from a date hierarchy.
Proud to be a Super User!
When I used this measure works but he didn't solve the real reason why I wanna make this measure,
New dax code used:
This is what I get now :
what I want is to have the line of 2022 always drawn and when I filter by year the other lines are changed in this way I can always compare this year (2022) with the year that I want to choose
I don't know if I managed to explain myself well or not, but thank you very much for your time and your answer.
Hi @tatouis ,
My first instinct would be to check the relationships in your model. I've recreated your issue and the measure works fine for me.
Did I help you today? Please accept my solution and hit the Kudos button.
i solve it thank you
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
99 | |
76 | |
66 | |
61 |
User | Count |
---|---|
142 | |
106 | |
103 | |
85 | |
70 |