Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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

  • 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.

3 Replies

  • 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's avatar
      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?

      • JorgePinho's avatar
        JorgePinho
        Solution Sage

        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.