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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Particular cell to Percentage format

Hi All,

 

Need you help to change a perticular cell to % if the correspondent row is specific text.

 

This is how i have the data.

adhvaith_0-1651819068549.png

Expected output is as below

 

adhvaith_1-1651819123361.png

 

Whereever column A is Approval then the correspondent cell in the Column B should be in % format rest all to be in number format 

5 REPLIES 5
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

The data type of a column is fixed, it cannot have both percentage and number, so you can only do it in measure, you can directly create a measure.

Measure =
IF (
    MAX ( 'Table'[Type] ) = "Approval",
    FORMAT ( SUM ( 'Table'[Score] ), "0%" ),
    MAX ( 'Table'[Score] )
)

Get the result.

vkalyjmsft_0-1652255132273.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi,

Thanks for taking time to respond me. % for approval is summing up. I need to visulaize it as it is.

Ex: 

TypeMeasure
A1
Approval90%
B2
C3
D4
E5
Approval92%

Hi @Anonymous ,

In a visual, the same items are automatically accumulated, if you don't want this, you need to add a new column to distinguish them, for example a index column.

vkalyjmsft_0-1652319152198.png

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , That will make you measure as text type meausre

Create a score measure

score m=  sum(Table[Score])

 

 

then try like

if(Max(Table[Type]) = "Approval"), format([score m],"percent"), , format([score m],"number") )

Anonymous
Not applicable

Hi Amit,

 

Thanks for sharing, but it is not working 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.