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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Sherlyn5
New Member

Showing value & text as percentage in one column

Hi all!

 

I am working on a set of data where the x&y values are decimals but the legend is a column with mix numbers (percentage) & text. By default, power bi sets the legend column as text, hence, the percentages are shown as decimals. However,I wanted to show the values as percentage. So, I have tried setting the column as percentage but the text part of the column becomes errors. 

 

Is there any way to solve this? I really appreciate the help.

 

Regards,

Distressed

beginner

 

@percentage

1 ACCEPTED SOLUTION

Hi, @Sherlyn5 

 

It’s my pleasure to answer for you.

According to your description, I think you can create a column to calculate the desired result.

Like this:

Column =
VAR legend = [legend]
VAR legend2 =
    IFERROR ( ( VALUE ( legend ) * 100 ) & "%", legend )
RETURN
    legend2

v-janeyg-msft_0-1604026464400.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Sherlyn5 , Can you share sample data and sample output in table format?

Hi, @amitchandak , @lavdeepk thank you so much for your replies
Here is the sample data, currently i build it as a line chart (where legend, x & y are the fields respectively)

Legend           x               y

80%3.05286124.44432
80%3.51930623.99512
80%4.01321523.00923
80%4.52459221.27289
80%5.01562918.94843
80%5.50517115.92793
80%5.97425912.26576
70%2.6781218.73145
70%3.01137718.44885
70%3.51516917.62315
70%4.00804416.15538
70%4.5278113.88319
70%5.01735210.86268
70%5.2147789.515182
90%3.42886730.74615
90%3.52424730.74189
90%4.00953830.18476
90%4.53171729.03696
90%5.03355627.30105
90%5.51459424.76285
90%6.01298621.42066
90%6.51930617.32846
90%6.70661915.71367
100%3.9041638.86416
100%4.00896338.80594
100%4.52286838.24753
100%5.02551136.88641
100%5.51758235.04384
100%6.01746732.3977
100%6.49701229.16345
100%7.02240925.0704
105%4.14157742.81608
105%4.53171742.37029
105%5.03504941.33043
105%5.51792739.64891
105%6.0280437.3236
105%6.51769734.35664
105%7.02505230.74632
105%7.44667927.19337
60%2.28602613.82258
60%2.51459413.65174
60%2.9995412.93398
60%3.51172111.57244
60%4.0035629.622777
60%4.5127566.869132
Surge2.26683513.76989
Surge2.65904418.73231
Surge3.04332324.44474
Surge3.4382930.69218
Surge3.94219738.80892
Surge4.14157742.81608
Stonewall4.1477428.870013
Stonewall4.51428310.63703
Stonewall4.78973912.20461
Stonewall5.16557414.07319

Hi, @Sherlyn5 

 

It’s my pleasure to answer for you.

According to your description, I think you can create a column to calculate the desired result.

Like this:

Column =
VAR legend = [legend]
VAR legend2 =
    IFERROR ( ( VALUE ( legend ) * 100 ) & "%", legend )
RETURN
    legend2

v-janeyg-msft_0-1604026464400.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

Hi @Sherlyn5 

 

I have created a calulated colunm to show value & percentage in one column i am sharing example below

 

percentage & Text = FORMAT(DATA[DIFF %]*100,0)&"%"&"PTS"

Output

1.JPG When i use calulated colunm in legend this work for me you can aslo try this

2.JPG

Thanks

Lavdeep

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.