Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi.
I have a problem making Conditional Columns work.
Have a column with values from 0-100 and some blanks. I just want all the rows that contain a number to have text and the blanks to be empty. PowerBI won't accept making a null into a null somehow. Is there a workaround?
Thanks in advance
Solved! Go to Solution.
The cause of the problem is that you test the values if they are > 0, which won't work for nulls.
Options:
= if [Satisfaction Score] = null then null else "String" = if [Satisfaction Score] <> null then "String" else null = if [Satisfaction Score] is number then "String" else null
How exactly are you trying to do this?
Proud to be a Super User!
I'm trying with the conditional column tool.
It just won't accept a blank as a blank.
Type null in that last box. Lowercase, no quotation marks or anything.
Proud to be a Super User!
I've tried that and it just wont accept it. I get an error.
Show me the settings for the custom column again now that you've changed them.
Proud to be a Super User!
It looks like this.
Is there a Change Data Type step after you add this column? When I create a column with the same settings it works fine.
Proud to be a Super User!
No, There are no further steps. And if I change the type manually, the errors persist. I've created conditional columns before, but have never had this issue.
I can't replicate that error. Maybe add another condition that checks for null values in your satisfaction score column first?
Proud to be a Super User!
I have tried it. Have no idea why it won't work. I just might have to duplicate the column and replace all the values.
The cause of the problem is that you test the values if they are > 0, which won't work for nulls.
Options:
= if [Satisfaction Score] = null then null else "String" = if [Satisfaction Score] <> null then "String" else null = if [Satisfaction Score] is number then "String" else null
I tested for null values first and then went on to check the values. @MarcE's answer helped me with this. Hope this works for you guys too.
Thanks a lot! 🙂
User | Count |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |