Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a table with 2 columns - Deposits in INT Format, TransactionMonth in DATEformat
I need to calculate the difference (plus or minus) between each month, in INT format.
I have searched all the previous posts about month to month change, and they all are more complicated than what I'm trying to do (percentages, sums etc) and I can't seem to reverse engineer the DAX code in those into what I'm looking for
Solved! Go to Solution.
@andyor
Step 1 - in query editor , add index column.
Step 2: Close & Apply
Step 3: Add new column -this gives a column with the deposit for previous row.
A better option would be to have the months as dates and also have a calendar table then use the previous period dax.
The Nick
If the post helps please give a thumbs up || If it solves your issue, please accept it as the solution to help the other members find it more quickly.
If it's the biggest heap of stinky smelly stuff then I'm sorry .
@andyor
Step 1 - in query editor , add index column.
Step 2: Close & Apply
Step 3: Add new column -this gives a column with the deposit for previous row.
A better option would be to have the months as dates and also have a calendar table then use the previous period dax.
The Nick
If the post helps please give a thumbs up || If it solves your issue, please accept it as the solution to help the other members find it more quickly.
If it's the biggest heap of stinky smelly stuff then I'm sorry .
@NickA01 I do have what you said, a calender table linked to the page and a filter that searches last 12 month, last 24 months etc. What is that more elegant solution of using pervious period?
Also question on why we're using Calculate and SUM, when there is only 1 row for each month? i.e. it's already summed?
In the initial example, ther was just the Mth column to work with hence we could not use any of the wonderful time intelligence functionality. If you have a date table, Previous Period should work.
Also , there is a newish DAXfunction called OFFSET. - Icannot get it towork in Aug 2022 Pbi desktop and can't find a lot of info but I did find this blog.
How OFFSET in DAX will make your life easier – Data – Marc (data-marc.com)
Regarding Calculate - Needed so we can evaluate using the filter.
User | Count |
---|---|
123 | |
76 | |
62 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |