Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hello,
I am trying to create a measure with an IF filter resulting in a Yes/No column but keep coming up to problems.
I have two columns where if the value in Column 1 is greater than the value in Column 2 it will result in a Yes answer so that I can include it in a Slicer visual.
So far the measure I have is:
Measure 1 = IF('Table),[Column1]>[Column 2])"Yes","No"
but that comes up with errors even with every type of punctuation variation.
Any help would be appreciated.
Thanks in advance
Solved! Go to Solution.
@v-rouge
To create a if measure, you need to add a aggregation function for the columns (sum, max or min).
Measure = IF(SUM('Table'[Column1])>SUM('Table'[Column2]),"YES","NO")
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-rouge
To create a if measure, you need to add a aggregation function for the columns (sum, max or min).
Measure = IF(SUM('Table'[Column1])>SUM('Table'[Column2]),"YES","NO")
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this
Measure 1 = IF(SELECTEDVALUE('Table'[Column1])>SELECTEDVALUE('Table'[Column 2]),"Yes","No")
Many thanks for responding @VikramBasriyar
The measure is correct (in that there are no errors) but all results still come up as No even though I know that some should be Yes.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.