Forum Discussion
multiple formatting column in single column
Is it possible to format number and text in a single column? I have data to show % of some cases as number (% format) and if no cases are found then "NA" (which is text format).
I appreciate you help.
Thanks,
Sulin
5 Replies
- amitchandakSuper User
sulin , You need to use format And Switch and create a text measure. Or Create a field parameter (refer video below)
example code
Switch(True(),
max(Table[Type]) ="%", format([Measure], "percent", [Measure] )
- sulinNew Member
Hi Amitchandak,
Thank you for the solution. can you please send the same with example then I can relate with my issue?
Thank you,
Sulin
- v-xiaotangCommunity Support
Hi sulin
>>Is it possible to format number and text in a single column?
if you put number and text in one column, then the format of this column will be TEXT. Can you provide some sample data and your expected results, so that I can help you further.
>>I have data to show % of some cases as number (% format) and if no cases are found then "NA" (which is text format).
You can try if() function, e.g. measure= if(.... , your number, "NA")
IF function (DAX) - DAX | Microsoft Docs
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- v-xiaotangCommunity Support
Hi sulin
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- sulinNew Member
Hi Community support team,
I am sharing with you my sample data and required format of the data.
Column1 Column2 0.16 16% 0.54 54% 0.11 11% NA NA 0.07 7% 0.03 3% NC NC 0.19 19% 0.43 43% I have data like in column1. when I wanted to show the data in powerbi visual (table), it just showed as it was. But i wanted to show in powerbi visual as formatted in Column2. I tried to apply format, but it didn't allow me to do so. So, my problem is to show column1 data as column2 in powerbi visual (table).
Thank you.
Best regards,
Sulin