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.
hi everyone
i'm newbi at power bi
have this table
so i switch it to matrix to
and now i need to show The difference between 2019 and 2020 rahter than toatal becuse i don't need total
(differenceValue=2020-2019)
how can i do that?!
Solved! Go to Solution.
@mohammedmqi , create a separate year/date table and use a formula like this
This Year = CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
@mohammedmqi , create a separate year/date table and use a formula like this
This Year = CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table'[Amount]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))
diff = [This Year]-[Last Year ]
diff % = divide([This Year]-[Last Year ],[Last Year ])
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
thanks for reply
i use this for this yaer
This Year = CALCULATE(sum(GENERALJOURNALACCOUNTENTRY[AMOUNT]),filter(ALL(GENERALJOURNALACCOUNTENTRY[DateGJ].[Year]),GENERALJOURNALACCOUNTENTRY[DateGJ].[Year]=max(GENERALJOURNALACCOUNTENTRY[DateGJ].[Year])))
and this last year
Last Year = CALCULATE(sum(GENERALJOURNALACCOUNTENTRY[AMOUNT]),filter(ALL(GENERALJOURNALACCOUNTENTRY[DateGJ]),GENERALJOURNALACCOUNTENTRY[DateGJ]=max(GENERALJOURNALACCOUNTENTRY[DateGJ])-1))
so i need to reviw the this calculation to make sure
i'll be back after that
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 |
---|---|
105 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
141 | |
107 | |
100 | |
82 | |
74 |