Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi Team
I'm trying to create a column to show "over 24 hours as text for the below query but keep getting an error of "Cannot convert value 'Over 24 Hours' of type Text to type Number".
Can someone help with this?
Solved! Go to Solution.
Thanks, doing that then gives me the below error...
Cannot convert value 'Over 24 Hours' of type Text to type Integer.
Hi @ZachUnger ,
Please try.
Column =
SWITCH(
TRUE(),
'DATA'[HrsBtwRecievedandAssigned]<=0,"0",
'DATA'[HrsBtwRecievedandAssigned]<=2,"2",
'DATA'[HrsBtwRecievedandAssigned]<=24,"24",
"Over 24 Hours"
)
In desktop please make sure the final output type is the same.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @ZachUnger ,
Please try.
Column =
SWITCH(
TRUE(),
'DATA'[HrsBtwRecievedandAssigned]<=0,"0",
'DATA'[HrsBtwRecievedandAssigned]<=2,"2",
'DATA'[HrsBtwRecievedandAssigned]<=24,"24",
"Over 24 Hours"
)
In desktop please make sure the final output type is the same.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
@ZachUnger help me to help you please.
Post some simple sample data and the code for your column now and i'll have a look
Value "Converts a text string that represents a number to a number" so it's going to error on this : VALUE("Over 24 Hours").
If you want a text column, I think you can remove the VALUE from all return clauses. That's without testing so see how you get on
Thanks, doing that then gives me the below error...
Cannot convert value 'Over 24 Hours' of type Text to type Integer.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
126 | |
78 | |
78 | |
60 | |
51 |
User | Count |
---|---|
164 | |
84 | |
68 | |
68 | |
58 |