Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm a new Power BI user and used to SQL and excel.
I tried this in DAX as a nested if statement, but gave me an error.
StandardResult = if(Standards[Score]>Standards[Year Level],"Above",if(Standards[Score]<Standards[Year Level],"Below","At Standard"))
Thanks for any help,
Q
Solved! Go to Solution.
The code you wrote should work in a calculated column on the Standards table, but if you are creating a measure then you would need to use SELECTEDVALUE, like
StandardResult =
IF (
SELECTEDVALUE ( Standards[Score] ) > SELECTEDVALUE ( Standards[Year Level] ),
"Above",
IF (
SELECTEDVALUE ( Standards[Score] ) < SELECTEDVALUE ( Standards[Year Level] ),
"Below",
"At Standard"
)
)
The code you wrote should work in a calculated column on the Standards table, but if you are creating a measure then you would need to use SELECTEDVALUE, like
StandardResult =
IF (
SELECTEDVALUE ( Standards[Score] ) > SELECTEDVALUE ( Standards[Year Level] ),
"Above",
IF (
SELECTEDVALUE ( Standards[Score] ) < SELECTEDVALUE ( Standards[Year Level] ),
"Below",
"At Standard"
)
)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
12 | |
10 | |
10 | |
6 |