cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vitexo87
Post Prodigy
Post Prodigy

Convert the value to%

I have a measure in which I must bring the value of it inwardly and also in percentage:

 

Productivity = (sum (IndicatorValue [Value]) / COUNT (Equipment [Description]))

 

Untitled.png

When I bring the information in integer, the information comes in correctly, but when I bring it in the percentage format it does not treat the information, applying only the% to the end of the value, thus leaving the incorrect value.

In this case the value to be presented in% would be 85.68%.

 

What should I do to get the correct value in% displayed as I expect?

 

1 ACCEPTED SOLUTION
v-yuezhe-msft
Microsoft
Microsoft

Hi @vitexo87,


Agree with @vanessafvg.

Your issue is caused by that the Productivity measure returns a value which is greater than 1, when you convert it to percentage in Power BI, the Productivity value will be multiplied by 100 and be displayed with % added. Only when the Productivity measure returns a value which is less than 1, you will get a percentage value within 100%.

If you want to make the current measure return 0.8568, you would need to write the measure using : ((sum (IndicatorValue [Value]) / COUNT (Equipment [Description])))*0.0000001. This way, when you convert it to %, you will get 85.68%. However, I don’t think the above formula makes any sense, as you manually multiply the measure by 0.0000001.

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

10 REPLIES 10
v-yuezhe-msft
Microsoft
Microsoft

Hi @vitexo87,


Agree with @vanessafvg.

Your issue is caused by that the Productivity measure returns a value which is greater than 1, when you convert it to percentage in Power BI, the Productivity value will be multiplied by 100 and be displayed with % added. Only when the Productivity measure returns a value which is less than 1, you will get a percentage value within 100%.

If you want to make the current measure return 0.8568, you would need to write the measure using : ((sum (IndicatorValue [Value]) / COUNT (Equipment [Description])))*0.0000001. This way, when you convert it to %, you will get 85.68%. However, I don’t think the above formula makes any sense, as you manually multiply the measure by 0.0000001.

Regards,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

personally i think there is something incorrect in the data that is making the % that high, otherwise you have some super effective machinery





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




jayeckles
Advocate II
Advocate II

First, create a new measure that sums IndicatorValue[Value]:

Indicator Values = calculate(sum(IndicatorValue[Value])) 

 

Next, create a new measure that counts Equipment[Description] regardless of context (that is, filters on other fields):

 

Machine Count = calculate( DISTINCTCOUNT( Equipment[Description]), All( Equipment ) )

If you have fields for which you want to maintain the context (that is, if you have a slicer for Factory and you want the denominator of your productivity quotient to include only machines in that factory, you can use AllExcept, e.g.:

Machine Count = calculate( DISTINCTCOUNT(Equipment[Description]), AllExcept(Equipment,Equipment[Factory]))

Finally, a new measure that calculates the quotient:

Productivity = [Indicator Values]/[Machine Count] 

Use the modeling tab to set the format of Productivity to a percentage.

@jayeckles

I made the suggested change prem the value that is reported when converted to percent% is 885205,021% ie the format is still incorrect, it should display 88.52%

vanessafvg
Super User
Super User

It would need to be a decimal, an integer is greater than or = 1, if you wanted to convert it to a % using the % formatter, your base data would need to be 0.8568 for the % formatter to adjust it correctly.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Using the measure I posted, is it possible to give an example of how it should be?

@vitexo87

 

when you divide a total into a count that is usually to get an average number. ie the average value,  What is the measure called and what is  its purpose?

 

so when you say value/ count what do those number refer to and what are you trying to do, hope that makes sense

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

The purpose is to know the efficiency% of production of a machine, the sum (esá adding the produced items) and count (counting the quantity of machines in production)

@vitexo87

 

are you sure your data is correct because the numbers seem very high are you able to plot it on a graph, maybe there are some outliers in the data?  From what i can tell you are doing the correct calculation but maybe you need to analyse your data to check that all the values are valid.  What is the total value and how many machines are you dividing the total value into?  can you paste that here?  How are you calculating those values?  

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

I only need to know the change in my measure that I have to do to make the value come 0.8568, because from this I can create another measure that will present the value that I expect

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors