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.
Hello,
I have an address column that I want to round down to the hundred block (EX: 11111 Washington Av to 11100 Washington Av, 123 Washington Av to 100 Washing Av, 1234 Washington Av to 1200 Washington Av and so on). I did some searching and found that the ROUND([field], -2) function works in this case.
I splited the address column by space, and left with a column that mostly have the house numbers but some are texts because of intersection addresses. I tried to do an if statement to round the number to the hundred block if it is a number and return the text if it isn't but my DAX doesn't seem to be working. Its giving this an error message of "Expression that yield variant date-type cannot be used to define calculated columns"
Here is my attempt:
@Jayrx7 ,
The issue is that in Power BI, you cannot have text and numbers in the same column. This is what is meant by "variant-data type"
If you format everything to a text, your non-numeric addresses will remain. Your address blocks will just be formatted as text.
Hope you can make this work for you. If not, please post a small sample of your actual data and we can try to work out an alternate solution.
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 |
---|---|
97 | |
95 | |
77 | |
72 | |
65 |
User | Count |
---|---|
136 | |
109 | |
104 | |
82 | |
73 |