Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello DAX People,
So basically I need to create a Running Total, I have created a measure which is calculating active EMIs(SIP), I have visualized it on the bargraph as well (screenshot attatched).
Calculations for Measure:
So,
Here one more thing we need to add in this bar graph, is an another bar showing running total of EMIs over months.
I tried creating the same using this logic:
So is there any other logic in your mind which could be working in this scenario?
Thanks
Mihir
Solved! Go to Solution.
Try Using this measure:
Cummulative SIP =
Hi , @miiihiir
According to your description, you want to calculate the rolling total from a measure?
If this , here are the steps you can refer to :
(1)This is my test data:
(2)We need to create a date table as a dimension table:
Date = ADDCOLUMNS(
CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
"Year", YEAR ( [Date] ),
"Month", MONTH([Date]),
"Year_Month", year([Date]) * 100 + MONTH([Date])
)
And we need to create a relationship between two tables:
In my test measure is this:
(3)Then we can create a measure like this:
Rolling Total = var _t = SUMMARIZE(ALLSELECTED('Date') ,'Date'[Year_Month] , "measure" , [My Measure])
var _cur_year_month = MAX('Date'[Year_Month])
var _t2 =FILTER(_t , [Year_Month]<=_cur_year_month)
return
SUMX(_t2, [measure])
Then we can get the rolling total:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Try Using this measure:
Cummulative SIP =
Try
Run SIP =
VAR MaxDate =
MAX ( 'T_ORDER (For SIP)'[order_date] )
RETURN
SUMX (
FILTER (
ALL ( 'T_ORDER (For SIP)'[order_date] ),
'T_ORDER (For SIP)'[order_date] <= MaxDate
),
[Running SIP]
)
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
9 | |
6 |