Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
| 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.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 10 | |
| 7 | |
| 6 |