Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a column with different numbers. However there also rows with null...
When I try to create a new column (LTAR1) and try to put 0 every time a "null" is detected, it gives me the following error:
Expression.Error: We cannot convert the value null to type Logical
See the part: else if [LTAR] = null then 0...
Solved! Go to Solution.
Typically you would replace the null values with 0 (zero) before adding the custom column OR
create a variable like :
let col1 = if [Column1] = null then 0 else [Column1] in ...... and use the variable col1 in the 'if..then..else' you have above. That can look a bit messy but it should work
Typically you would replace the null values with 0 (zero) before adding the custom column OR
create a variable like :
let col1 = if [Column1] = null then 0 else [Column1] in ...... and use the variable col1 in the 'if..then..else' you have above. That can look a bit messy but it should work
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 61 | |
| 44 | |
| 41 | |
| 36 | |
| 21 |
| User | Count |
|---|---|
| 175 | |
| 119 | |
| 106 | |
| 77 | |
| 50 |