Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
jcastr02
Post Prodigy
Post Prodigy

show specific rows as % all others as text

I have a table of store details (which I had to pivot and stack all into rows vs. columns) for other purposes.  However, now I'd like to just convert some of values to show as %.  Is there a way to create a new column but say column XYZ and column ABC - show as %, all others show as text.  See below ones in yellow I need as %.

Screenshot 2024-01-27 160624.png

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@jcastr02 

output : column Custom

Daniel29195_0-1706397613217.png

 

 

try this : 

Daniel29195_1-1706397633513.png

 

if [Column3] = "pct" then Text.Combine({"%" ,Text.From(Decimal.From([Column2]))},"") else [Column2]

 

first you convert it into decimal, then you add the % to it. 

 

 

NB : 

you need to specify  which rows are pct and need to be converted ( check column3  ) 

 

 

 

If my answer helped sort things out for you, feel free to give it a thumbs up and mark it as the solution! It makes a difference and might help someone else too. Thanks for spreading the good vibes! 👍🤠

View solution in original post

1 REPLY 1
Daniel29195
Super User
Super User

@jcastr02 

output : column Custom

Daniel29195_0-1706397613217.png

 

 

try this : 

Daniel29195_1-1706397633513.png

 

if [Column3] = "pct" then Text.Combine({"%" ,Text.From(Decimal.From([Column2]))},"") else [Column2]

 

first you convert it into decimal, then you add the % to it. 

 

 

NB : 

you need to specify  which rows are pct and need to be converted ( check column3  ) 

 

 

 

If my answer helped sort things out for you, feel free to give it a thumbs up and mark it as the solution! It makes a difference and might help someone else too. Thanks for spreading the good vibes! 👍🤠

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.