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.
I have the following calculated column that works correctly:
Total PCR =
VAR Date1 = 'Table1'[date]
RETURN
CALCULATE (
SUM ('Table1'[Total] ),
FILTER (
'Table1',
'Table1'[date] <= Date1),
FILTER( 'Table1', 'Table1'[Request_Type] = "Defect")
)
If I remove however the highlighted part and add a slicer based on [Request_Type] instead, it does not work correctly anymore. I was hoping a filter will change the way column calculates but it doesn't... Selecting "Defect" from the slicer does not produce the same result.
[Request_Type] column has three possible values: "Defect", "Enhancement", "Change".
How can I make it work based on a filter/slicer?
Solved! Go to Solution.
Have you tried creating that as a measure instead of a calculated column?
Have you tried creating that as a measure instead of a calculated column?
Problem solved.
Measure:
Total PCR1 =
CALCULATE (
SUM ('Table1'[Total]),
FILTER ( ALL ('Table1'), Table1'[date] <= MAX ( Table1'[date] ) ),
VALUES(Table1[Request_Type] )
)
Note: the key was adding VALUES(Table1[Request_Type] ) as demonstrated in: http://community.powerbi.com/t5/Desktop/DAX-Running-total-by-another-column/m-p/10517#M2191
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |