This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I am quite new to DAX, and I would like to make a Measure that computes different normal distributions based on a string type defined in another column.
Here is the sample table:
Now each type has a different mean and standard deviation I want to put into my calculation, so the Switch statement should look similar to this:
Distribution Value =
SWITCH(
TRUE(),
SUM('Normal Distribution'[Type])="A",
NORM.DIST(SUM('Normal Distribution'[X-Values]),240,100,FALSE()),
SUM('Normal Distribution'[Type])="B",
NORM.DIST(SUM('Normal Distribution'[X-Values]),350,75.6,FALSE()),
SUM('Normal Distribution'[Type])="C",
NORM.DIST(SUM('Normal Distribution'[X-Values]),312,120,FALSE()),
0
)However, I know this is wrong, because you cannot use SUM() with strings, but without using SUM(), I don't know how to access the 'Normal Distribution'[Type] column.
Can anyone take a look? I hope this is quick. Thank you!
Solved! Go to Solution.
@Anonymous -
I do not know what the answers are supposed to be however, using SELECTEDVALUE ( ) seems to not cause an error.
Distribution Value =
SWITCH(
TRUE(),
SELECTEDVALUE('Normal Distribution'[Type])="A",
NORM.DIST(SUM('Normal Distribution'[X-Values]),240,100,FALSE()),
SELECTEDVALUE('Normal Distribution'[Type])="B",
NORM.DIST(SUM('Normal Distribution'[X-Values]),350,75.6,FALSE()),
SELECTEDVALUE('Normal Distribution'[Type])="C",
NORM.DIST(SUM('Normal Distribution'[X-Values]),312,120,FALSE()),
0
)
Proud to be a Super User!
@Anonymous -
I do not know what the answers are supposed to be however, using SELECTEDVALUE ( ) seems to not cause an error.
Distribution Value =
SWITCH(
TRUE(),
SELECTEDVALUE('Normal Distribution'[Type])="A",
NORM.DIST(SUM('Normal Distribution'[X-Values]),240,100,FALSE()),
SELECTEDVALUE('Normal Distribution'[Type])="B",
NORM.DIST(SUM('Normal Distribution'[X-Values]),350,75.6,FALSE()),
SELECTEDVALUE('Normal Distribution'[Type])="C",
NORM.DIST(SUM('Normal Distribution'[X-Values]),312,120,FALSE()),
0
)
Proud to be a Super User!
Thanks, that did what I wanted it to do.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 45 | |
| 28 | |
| 24 | |
| 22 |