Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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
User | Count |
---|---|
98 | |
89 | |
82 | |
70 | |
67 |
User | Count |
---|---|
114 | |
104 | |
101 | |
72 | |
65 |