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

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.

Reply
sparkymark75
Frequent Visitor

Using DAX to get a cumulative total using measures

I have the following measures defined in a dataset;

 

DOAs = CALCULATE(COUNT('Incident'[TicketNumber]),'Incident'[new_installoutcome] = "100000000")
FOAs = CALCULATE(COUNT('Incident'[TicketNumber]),'Incident'[new_installoutcome] = "100000001")
InstallAttempts = CALCULATE(COUNT('Incident'[TicketNumber]),'Incident'[new_installoutcome] = "100000000",'Incident'[new_installoutcome] = "100000001",'Incident'[new_installoutcome] = "100000002")
InstallFailRate = DIVIDE((DOAs + FOAs), InstallAttempts)

What I now need is a measure which is a sum of the DOA and FOA measures divided by a sum of the install attempts. If this worked it would look like this...

 

InstallFailRate = DIVIDE((SUM(DOAs) + SUM(FOAs)), SUM(InstallAttempts))

How do I achieve this in DAX? Do I have to break use the root calculation of each measure in the new measure?

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @sparkymark75 

You may try below measure to get the cumulative total of a measure.For example:

Measure =
CALCULATE (
    [DOAs],
    FILTER ( ALL ( Incident ), Incident[date] <= MAX ( Incident[date] ) )
)

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @sparkymark75 

You may try below measure to get the cumulative total of a measure.For example:

Measure =
CALCULATE (
    [DOAs],
    FILTER ( ALL ( Incident ), Incident[date] <= MAX ( Incident[date] ) )
)

1.png

Regards,

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.