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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Rajeshcric424
Frequent Visitor

Power BI table Desktop

I have table in Power BI having two columns. I need want show 0.31 as 31% which is 0.31 multiply by hundred and add % at last for only for values  stock tank B2 (EUC) and Stock tank C(Res/ARS)  like 31% and 12% remaining all other values does not change. How to do this using Dax in Power BI.

 

Rajeshcric424_0-1680294616717.png

 

Output: 

Tag_DescriptionValue
Stock tank B2 (Euc)31%
Stock tank C (Res/ARS)12%
Stock tank D (Res/ARS)0.00
Wickit 1285 (#/ton)6.99
CMC Calexis (#/ton)2.99

 

2 ACCEPTED SOLUTIONS
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,
 
try this measure:
 
Value Measure For Multiple Data Formats = IF(OR(CONTAINSSTRING(SELECTEDVALUE('TableName'[Tag_Description]),"(Euc)"),CONTAINSSTRING(SELECTEDVALUE('TableName'[Tag_Description]),"(Res/ARS)")),FORMAT(SUM('TableName'[Value])/100,"Percent"),FORMAT(SUM('TableName'[Value]),"#"))

View solution in original post

Sorry change the last part of the measure ,"#")) to ,"0.00")) for decimal

View solution in original post

11 REPLIES 11
Rajeshcric424
Frequent Visitor

 Thanks for your help, I am new to Power BI in learning phase. I have tried the measure but it showing the out as 0.31% and 0.12%  not as 31% and 12%.

Try removing the /100 part of the measure, that should give you 31.00% & 12.00%:
 
Value Measure For Multiple Data Formats = IF(OR(CONTAINSSTRING(SELECTEDVALUE('Table'[Tag_Description]),"(Euc)"),CONTAINSSTRING(SELECTEDVALUE('Table'[Tag_Description]),"(Res/ARS)")),FORMAT(SUM('Table (3)'[Value]),"Percent"),FORMAT(SUM('Table (3)'[Value]),"0.00"))

Also if you don't want the .00 after the percentage you can change "percent" to "0%" full measure below:

 

Value Measure For Multiple Data Formats = IF(OR(CONTAINSSTRING(SELECTEDVALUE('Table'[Tag_Description]),"(Euc)"),CONTAINSSTRING(SELECTEDVALUE('Table'[Tag_Description]),"(Res/ARS)")),FORMAT(SUM('Table'[Value]),"0%"),FORMAT(SUM('Table'[Value]),"0.00"))

Hi This is measure is working good showing values 31% and 12%. but all the values are showing empty. 

Rajeshcric424_0-1680515556118.png

 

In my table ther are only five stock tank B2 but all the others it is showing as Stocktank B2 and empty. same for values taking for all the columns after applying the measure

 

example:

there five rows in table one row is stock tank B2 . it chnage the value for 31% for paticular rows. it shwoing five rows with stcok tank B2 and one 31% others empty

Without seeing more of what is in the file it's going to be difficult to tell why that's happening. Have you got a copy of the PBI file i can take a look at?

This measure is working fine now. Thanks a Lot. How to do as New column without the measure. Is it Possible.

I believe due to the different formats you want within a single column it will need to be a measure. 

elizabeth1
New Member

Power BI Desktop is a business analytics service provided by Microsoft that allows users to create reports and visualizations using their data. I use this WordPress blog editor on my website 먹튀사이트 Power BI Desktop includes a wide range of features, one of which is the ability to create tables.

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,
 
try this measure:
 
Value Measure For Multiple Data Formats = IF(OR(CONTAINSSTRING(SELECTEDVALUE('TableName'[Tag_Description]),"(Euc)"),CONTAINSSTRING(SELECTEDVALUE('TableName'[Tag_Description]),"(Res/ARS)")),FORMAT(SUM('TableName'[Value])/100,"Percent"),FORMAT(SUM('TableName'[Value]),"#"))

Sorry change the last part of the measure ,"#")) to ,"0.00")) for decimal

Migasuke
Memorable Member
Memorable Member

Hi @Rajeshcric424 ,

Check the following solution, where you use IF, SELECTEDVALUE and FORMAT together:
https://community.powerbi.com/t5/Power-Query/How-to-change-row-data-from-decimal-to-percentage/m-p/3...

 



If my answer was helpful please give me a Kudos or even accept as a Solution.

Let's connect on LinkedIn!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.