Forum Discussion
help me please
- 3 years ago
Create a new MEASURE with code like this;
My Measure = CALCULATE ( SUM ( 'Table'[Value] ), 'Table[Account] = "A", 'Table'[Date].Year = 2022 )
Note the purposeful exclusion of the logic for also getting Account = B in this measure. I am going to leave it up to you to research the CACLUCATE funtion, and the Logical Or operator.
Try UNPIVOT of the data in Power Query. That will get you a dataset like this:
Account Date Value
A 31/12/2022 $200
B 31/12/2022 $300
Now, ALL dates are in the same column.
Thanks you!
Now, my dataset is like this:
Account Date Value
A 31/12/2022 $200
B 31/12/2022 $300
C 31/12/2022 $100
A 31/12/2021 $700
B 31/12/2021 $400
C 31/12/2021 $200
I need to sum, for example, only the values A and B for the 2022. What's the best DAX expression to do this?