Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
hi all,
i need a simple measure DAX expression that checks a bit field and gets a value of "GOOD" when the field tested is 1 AND "BAD" if the tested fields is 0.
All my common sense attempts failed as I can't get the syntax ... and neither a fast answer to a simple question.
Thanks
Solved! Go to Solution.
Hello @vrv ,
If you need to have the result in the below format, you need to create a Calculated column. You are not able to enter the column name because you are trying to create a measure. And a column cannot be used in a measure.
Result = SWITCH(Table_Name[column_name], 1, "GOOD", 0, "BAD")
OR
Result = IF(Table_Name[column_name] = 1, "GOOD", "BAD")
Hi anybody, any idea?
my question is how do I enter the column name?
what is the correct format?
Apparently I can't drag and drop the column in there, so somethign is wrong ...
Thank you,
vrv
I
Hello @vrv ,
If you need to have the result in the below format, you need to create a Calculated column. You are not able to enter the column name because you are trying to create a measure. And a column cannot be used in a measure.
Result = SWITCH(Table_Name[column_name], 1, "GOOD", 0, "BAD")
OR
Result = IF(Table_Name[column_name] = 1, "GOOD", "BAD")
It is the "Bit Field". Please enter your Column name there.
Hello @vrv
Please review the below:
Result = SWITCH(TestedField, 1, "GOOD", 0, "BAD")
OR
Result = IF(TestedField = 1, "GOOD", "BAD")
Note: Replace "TestedField" with the name of the bit field in your data model.
Also, please upvote if you find it helpful.
hello saurabhkudale96,
what is the proper syntax for "TestedField"?
is it: Table.FieldName, [Table]FieldName, [Table]"FieldName", [Table].[FieldName] ........ ???
Thanks,
vrv
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
65 | |
53 |
User | Count |
---|---|
144 | |
103 | |
98 | |
85 | |
64 |