Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
pallavisave7
Frequent Visitor

Running total of a measure

I have 3 measures highlighed in screenshot, I want to calculate running total of a 3rd measure in a last column. I calculated it using quickmeasure - running total over year 

ccUnsolved running total in Year =
CALCULATE(
    [ccUnsolved],
    FILTER(
        ALLSELECTED('MyTicket'[createdate].[Year]),
        ISONORAFTER('MyTicket'[createdate].[Year], MAX('MyTicket'[createdate].[Year]), DESC)
    )
)
However get wrong result. I have ticket create date from which I am showing year and month.
pallavisave7_1-1682090830061.png

How can I get running total of ccUnsolved measure?

Expected va;lues as shown in highlighed column

pallavisave7_2-1682091405747.png

 

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Create a Calendar Table with calculated column formulas for Year, Month name and Month number.  Sort the Month name column by the Month number.  To your visual, drag Year and Month name by the Month number.  Write this measure

RT = calculate([ccunsolved],datesbetween(caendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@pallavisave7 , join the date with date of date table and use that in measure and visual

in case date has time stamp create a date first

new column

date = datevalue([created date])

 

 

example

 

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))

Cumm Based on Date = CALCULATE([Net], Window(1,ABS,0,REL, ALL('date'[date]),ORDERBY('Date'[date],ASC)))

Cumm Based on Date = CALCULATE([Net], Window(1,ABS,0,REL, ALLSELECTED('date'[date]),ORDERBY('Date'[date],ASC)))

 

Running Total/ Cumulative:
https://www.youtube.com/watch?v=h2wsO332LUo&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=42

 

Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.