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
Anonymous
Not applicable

Help with DAX formula

Hi all,

 

need help with my DAX formula. I currently have the table and DAX formula below, to get the cummulative figures for column B. It works fine. But i would like to only add the values where column D is "ongoin". How do i add that to the formula?

 

Current DAX:

calculate(sum(table1[rowcountpart]), FILTER (ALL(Table1), Table1[A10] <= MAX (Table1[A10])

 

Table1

ABCD
IDrow count partA10Status
A102022-04-01Ongoing
B52022-04-02Dropped
C42022-04-03Ongoing
D32022-04-04Ongoing
E22022-04-05Dropped
F12022-04-06Ongoing

 

Thanks in advance, BR rookie Patrik

1 ACCEPTED SOLUTION

Oh sorry, now I understood.

So the measure for the cumulative sum would be: 

CALCULATE(SUM(table1[rowcountpart]), FILTER(ALL(Table1), Table1[A10] <= MAX(Table1[A10])&& Table1[Status]="Ongoing"))

Then just create the line chart with A10 in the X-Axis and the Measure in the Values.

View solution in original post

3 REPLIES 3
JorgePinho
Solution Sage
Solution Sage

Can you tell me what did you want to archieve with this part: "Table1[A10] <= MAX (Table1[A10]"?

 

I would do this: CALCULATE(SUM(table1[rowcountpart]), FILTER (ALL(Table1), Table1[Status] = "Ongoing"))

Anonymous
Not applicable

Not, really. (I got this from a collegue). What I want is the cummulative figure of all in column B, displayed as a line chart over time for column C (A10). Where A10 is on the X-axis. 

 

Does that makes any sense?

Oh sorry, now I understood.

So the measure for the cumulative sum would be: 

CALCULATE(SUM(table1[rowcountpart]), FILTER(ALL(Table1), Table1[A10] <= MAX(Table1[A10])&& Table1[Status]="Ongoing"))

Then just create the line chart with A10 in the X-Axis and the Measure in the Values.

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.