Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I have a table like this (but > 40 columns)
A | B | C | D | E | F........ |
AA | AB | 0.28 | 0.68 | 0.99 | 0.41 |
BB | BC | 0.83 | 0.13 | 0.20 | 0.53 |
CC | CD | 0.56 | 0.24 | 0.09 | 0.45 |
DD | DE | 0.68 | 0.35 | 0.24 | 0.90 |
EE | EF | 0.03 | 0.55 | 0.73 | 0.39 |
I would like to add "%" on all values except the first 2 columns like this.
How to transform in Power Query with a efficient query?
A | B | C | D | E | F |
AA | AB | 0.28% | 0.68% | 0.99% | 0.41% |
BB | BC | 0.83% | 0.13% | 0.2% | 0.53% |
CC | CD | 0.56% | 0.24% | 0.09% | 0.45% |
DD | DE | 0.68% | 0.35% | 0.24% | 0.9% |
EE | EF | 0.03% | 0.55% | 0.73% | 0.39% |
Thanks in advance
Solved! Go to Solution.
pls see my video
https://1drv.ms/v/s!AiUZ0Ws7G26RiBgWRs6CITvMH5Hh?e=I1N5iV
Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26RiBeh65zx6Lo9gcL6?e=KLxt9B
= Table.TransformColumns(from,
List.Transform(
List.Skip( Table.ColumnNames(from),2),(i)=> {i,(x)=>
Text.Insert(Text.From(x),Text.Length(Text.From(x))
," %"),
type text}))
pls see my video
https://1drv.ms/v/s!AiUZ0Ws7G26RiBgWRs6CITvMH5Hh?e=I1N5iV
Sample PBIX file attached
https://1drv.ms/u/s!AiUZ0Ws7G26RiBeh65zx6Lo9gcL6?e=KLxt9B
= Table.TransformColumns(from,
List.Transform(
List.Skip( Table.ColumnNames(from),2),(i)=> {i,(x)=>
Text.Insert(Text.From(x),Text.Length(Text.From(x))
," %"),
type text}))
Hi @cjngct1112
you can add the format function to your measure to format it like this
@danextian , after I change the datatype to "percetage", it will auto devide by 100. not achieve the desired result
Hi @cjngct1112 ,
You can change the data type in Power Query but they will still be loaded as decimal numbers in the designer. In the designer, you have to select each column and change the formatting to percentage.
So you want to just add % after each number and for 40 columns?
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |