Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All,
I want to create a running total (Not YTD) based on previous 12 months. eg; in May 2017 result should be the count of data points from April 2016 and April 2017 count of data points from March 2016.
I used following formula, which doesn't sum up the 12 months data.
RN = CALCULATE(COUNT(DATA[Risk Number]),DATESINPERIOD(DATA[Date Occurred],Lastdate(DATA[Date Occurred]),-12,MONTH))
Appreciate if anyone has a solution for it.
Solved! Go to Solution.
@Anonymous
Please create a relationship between the Calendar and LTI table. Then use YearMonth in the X-Axis of the Line chart as below.
Best Regards,
Herbert
@Anonymous
Does above solution work on you side?
Best Regards,
Herbert
Hi Herbert @v-haibl-msft,
Unfortunately, it doesn't work. It only returns the total of the month not the aggregate value of last 12 months.
@Anonymous
That's strange. It works in my attached .pbix file. Could you please share your .pbix file through online file service like OneDrive? So that I can look into it.
Best Regards,
Herbert
Hi Herbert @v-haibl-msft
Check the link below ;
https://drive.google.com/open?id=0B-NaZUyqRQMoNTlBQ3BQOUU4dzQ
Regards,
Thilan
@Anonymous
Please try with following two measures.
Total_1 =
IF (
ISBLANK ( SUM ( Table1[Sales] ) ),
BLANK (),
CALCULATE (
SUM( Table1[Sales] ),
DATESBETWEEN (
'Calendar'[Date],
FIRSTDATE ( DATEADD ( 'Calendar'[Date], -11, MONTH ) ),
LASTDATE ( 'Calendar'[Date] )
)
)
)
Total_2 =
IF (
ISBLANK ( SUM ( Table1[Sales] ) ),
BLANK (),
CALCULATE (
SUM( Table1[Sales] ),
DATESBETWEEN (
'Calendar'[Date],
FIRSTDATE ( DATEADD ( 'Calendar'[Date], -12, MONTH ) ),
ENDOFMONTH ( DATEADD ( 'Calendar'[Date], -1, MONTH ) )
)
)
)
Best Regards,
Herbert
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 44 | |
| 42 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 72 | |
| 66 | |
| 33 | |
| 32 | |
| 31 |