Forum Discussion
Remove cumulative total
- 8 years ago
Hi JurriaanQEL
Please see the attached file here.
Hope this helps. Here are the steps I performed
As you said we need an assistant field to undo the Cumulatives. So
First I created a "Parameter Table" to get "month number" in our Main Table
Then we can use this Calculated Column to get Monthly figuresMonthly Figure = VAR PreviousMonthValue = CALCULATE ( SUM ( Table1[Cumulative] ), FILTER ( Table1, Table1[Year] = EARLIER ( Table1[Year] ) && Table1[MonthNumber] = EARLIER ( Table1[MonthNumber] ) - 1 ) ) RETURN Table1[Cumulative] - PreviousMonthValue
Hi Zubair_Muhammad,
Ok, so I am close...
May I ask you to share the file where you managed it with the relationships? Because even with that I am struggling (can't autodetect, or can't create relationship because one of the columns must have unique values)... I think I need to do a course in Power BI...
It's correct that the right table isn't working, I removed one field too many, but since that one was just to show you what numbers there are it wasn't very relevant anyway (and it was showing in the picture).
Thanks as always, very much appreciated.
Kind regards,
Jurriaan
Hi JurriaanQEL
Here it goes
https://1drv.ms/u/s!AhiuKaBxxAufjlj_7cIa7Xllk9u4
See the First item with No Month YEAR but a figure for CA Indemnity Paid.
I believe it means your Dim_Date doesot contain all the necessary dates.
These books are precious for learning DAX
Learn to Write DAX: A practical guide to learning Power Pivot for Excel and Power BI
- JurriaanQEL8 years agoRegular Visitor
Hi again Zubair_Muhammad,
I thinky you might be on to something.
There is indeed another column that has a date field.
I've uploaded the less-stripped version:
https://1drv.ms/u/s!AiecK9GUkh9Aqy7ukkq6ENOQ288c
The date field consists of year,quarter,month and day. How would that hold up in the DAX?
Cheers
- Anonymous6 years agoNot applicable
Its works for me when there is only date in the table, but the moment I add third column, it gives me the wrong result.
For instance, I have date, country and CumulativeSales and I need daily sales.
Please can you assist on this one as well.I have modified the data in your pbix file itself. Please check this here.