I am currently using a calculation to determine % of Inventory Remaining.
I would like to use an "IF" Statement to convert this calculation to "Plain Text" -
i.e. 100% = "SOLD OUT"
The challenge I am having is that If statements don't allow you to convert numbers to text:
DAX comparison operations do not support comparing values of type Number with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
Any thoughts how I can convert the calc and translate as text?
Go to Solution.
Have you tried using SWITCH in a new column or a measure?
[Measure] = your calculation
%toText = SWITCH([Measure], 1, "Sold Out", "")
View solution in original post
a possible proposal:1) convert Num (Percent) column to Text2) use SEARCH (or FOUND) function in if- statement
comparing text-to-text should be ok
I cannot convert the percent to text, it is a calc - so that options is disabled.
Any other thoughts?
can you create a second column as "text description" of the first, numeric column?
Check out the on demand sessions that are available now!
Check out the Winners!
Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.