Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have the following measure for calculating the running total of customers.
Running Total Customers:= CALCULATE( COUNT('Customers'[CustomerId]); FILTER(ALL(Date[CalendarDate]);Date[CalendarDate]<=MAX(Date[CalendarDate]) ))
Works like a charm. Now i want to have a measure showing what the running total was the same period last year. i have not been able to solve this.
For example:
Year, RTC, RTCLY 2010, 66, 2011, 77, 66 2012, 79, 77 2013, 90, 79
Please advice
Solved! Go to Solution.
@Anonymous
Please try with following measure for RTCL. And I create a new “Calendar Year” column in Date table.
CalendarYear = YEAR ( 'Date'[CalendarDate] )
Running Total Customers LY = CALCULATE ( COUNT ( 'Customers'[CustomerId] ), FILTER ( ALL ( 'Date'[CalendarDate] ), 'Date'[CalendarDate] <= MAX ( 'Date'[CalendarDate] ) && YEAR ( 'Date'[CalendarDate] ) < MAX ( 'Date'[CalendarYear] ) ) )
Best Regards,
Herbert
@Anonymous
Please try with following measure for RTCL. And I create a new “Calendar Year” column in Date table.
CalendarYear = YEAR ( 'Date'[CalendarDate] )
Running Total Customers LY = CALCULATE ( COUNT ( 'Customers'[CustomerId] ), FILTER ( ALL ( 'Date'[CalendarDate] ), 'Date'[CalendarDate] <= MAX ( 'Date'[CalendarDate] ) && YEAR ( 'Date'[CalendarDate] ) < MAX ( 'Date'[CalendarYear] ) ) )
Best Regards,
Herbert
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |