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
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
Employee
Employee

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
Employee
Employee

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.

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 III
Advocate III

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
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.