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.
Hi Team,
I have been working on a report where I want to display the cumulative total of last 3 months along with the previous months added values
@pradeepnani Try using
VAR LastSDate = MAX('CALENDAR'[Date])
VAR Last3Months = DATESINPERIOD('CALENDAR'[Date], LastSDate, -3, MONTH)
VAR Last3MonthsSum = CALCULATE(SUM(Orders[Freight]), Last3Months)
VAR Month1 = CALCULATE(SUM(Orders[Freight]), DATESINPERIOD('CALENDAR'[Date], LastSDate, -1, MONTH))
VAR Month2 = CALCULATE(SUM(Orders[Freight]), DATESINPERIOD('CALENDAR'[Date], EDATE(LastSDate, -1), -1, MONTH))
VAR Month3 = CALCULATE(SUM(Orders[Freight]), DATESINPERIOD('CALENDAR'[Date], EDATE(LastSDate, -2), -1, MONTH))
RETURN IF(
ISBLANK(SELECTEDVALUE('CALENDAR'[MONTH_YEAR])),
0,
FORMAT(Last3MonthsSum, "#,##0") & " (" & FORMAT(Month1, "#,##0") & ") + (" & FORMAT(Month2, "#,##0") & ") + (" & FORMAT(Month3, "#,##0") & ")"
)
Proud to be a Super User! |
|
@pradeepnani ,It would be better if instead of snap you share code with which we can work.
Proud to be a Super User! |
|
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
11 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |