Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Greetings all,
I'm new to Power BI/Dax in general so apologize if this might seems obvious but I couldn't manage to find a way to do it.
I basically have a dimension category here I need to sum AA & BB then CC & DD. And create a final table B
TABLE A: DETAILS | ||
Category | Value | |
AA | 10 | |
BB | 20 | |
CC | 30 | |
DD | 40 |
TABLE B: EXPECTED OUTCOME | ||
Category | Value | Output |
AA | 10 | 30 |
BB | 20 | 30 |
CC | 30 | 70 |
DD | 40 | 70 |
@AKHIL_RB_123 , First Create a new column
Cat =
Switch(True() ,
[Category] in {"AA", "BB"} , "Cat1" ,
"Cat2")
Now a new measure
sumx(filter(Table, [Cat]=earlier([Cat]), Table[Value])
or
sumx(allselected(Table), [Cat] = Max([Cat]) ), [Value])
User | Count |
---|---|
124 | |
108 | |
99 | |
62 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |