Hi, I have a huge table in powerpivot, an excerpt of the table is below. I could do this in excel but don't know DAX well enough to figure this out.
I want to create MeasureX that looks for Code d1201 for each unique PatID and each unique Date, if it finds d1201 Code for that date and PatID, it will sum production for all codes for that Date and PatID.
<tbody>
</tbody>
I am a DAX novice so the best I could come up with was
MeasureX:=CALCULATE([Production],Table
I want to create MeasureX that looks for Code d1201 for each unique PatID and each unique Date, if it finds d1201 Code for that date and PatID, it will sum production for all codes for that Date and PatID.
Date | PatID | Code | Production |
1/1/2014 | X15205 | d1201 | 30 |
1/1/2014 | X15205 | d151 | 10 |
1/1/2014 | X15205 | d1069 | 20 |
1/1/2014 | Z1502 | d1923 | 30 |
1/1/2014 | V2312 | d1283 | 40 |
1/2/2014 | X15205 | d123 | 10 |
1/3/2014 | R1231 | d3422 | 30 |
1/3/2014 | R1231 | d1923 | 80 |
1/3/2014 | R1231 | d1201 | 40 |
<tbody>
</tbody>
I am a DAX novice so the best I could come up with was
MeasureX:=CALCULATE([Production],Table
Code:
="d1201")
which, as expected, only returns the Production of 30 for date 1/1/2014 and PatID X15205.
In this example, I would want MeasureX to return Production of 60 for date 1/1/2014 and PatID X15205.
Thanks in advance.