Forum Discussion
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
| A | B | C | D |
| ID | row count part | A10 | Status |
| A | 10 | 2022-04-01 | Ongoing |
| B | 5 | 2022-04-02 | Dropped |
| C | 4 | 2022-04-03 | Ongoing |
| D | 3 | 2022-04-04 | Ongoing |
| E | 2 | 2022-04-05 | Dropped |
| F | 1 | 2022-04-06 | Ongoing |
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
- JorgePinhoSolution 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"))
- AnonymousNot 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?
- JorgePinhoSolution 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.