Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Code | Name | ||
PM 750 MG | A | measure1 | 20 |
CD-6"ASX | B | measure2 | 40 |
500-182-30 | C | measure3 | 35 |
CD-12"CP | D | ||
2046S | B | ||
103-137 | D | ||
530-123 | C | ||
CD-30DC | E | ||
CD-30DC | A | ||
CD-30DC | F | ||
CD-30DC | F | ||
CD-30DC | E | ||
CD-20APX | A | ||
CD-20APX | G | ||
CD-20APX | C | ||
CD-20APX | G | ||
192-630-10 | C |
I want to write a Dax measure to calculate (measure1 /2) if name =A or B, (measure2 /5) if name =C or D or E,(measure3 /7) if name =F or G
Thanks,,,,
Solved! Go to Solution.
1) Create a measure that changes with the selection in the filter. Ex. measure4 = values(name)
2.1) create another measure using switch statement. measure5 = switch(measure4, "A", [measure 1]/2, "B", [measure 1]/2, .......).
OR
It can also be done with IF statement.
2.2) It can also be done with IF statement.
1) Create a measure that changes with the selection in the filter. Ex. measure4 = values(name)
2.1) create another measure using switch statement. measure5 = switch(measure4, "A", [measure 1]/2, "B", [measure 1]/2, .......).
OR
It can also be done with IF statement.
2.2) It can also be done with IF statement.
I mean measure1/2 it divide measure1 / 2
Divide the measures OR divide measure1 by measure2
Also the previous response has been edited, see if that works.
User | Count |
---|---|
54 | |
23 | |
19 | |
18 | |
17 |
User | Count |
---|---|
91 | |
86 | |
46 | |
28 | |
22 |