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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

How to add a measure's result of many lines

Hi everyone!

I am currently working on a table that relates the amount of components that my company receives and returns.
Here is how the table is at this moment:

cpiolla_0-1667993929555.png

"Cod. Forn. Principal" is an ID.

"Entradas_bus" are the received components.
"Refugos_bus" are the components we have returned.
"Impacto_PPM" is calculated by a measure. It's the returned pieces of one ID divided by the SUM() of all received pieces during an interval of time.

"Porcentual PPM" is the % that each line represents in the total of 'Impacto_PPM'. Basically, I want to know how much % does 829,27 represents out of the total 'Impacto_PPM'.

Right now I'm struggling to calculate the "Porcentual PPM" because I can't find a way to get the summation of all lines in the "Impacto_PPM" column. 


can somebody help me please

 

 

1 ACCEPTED SOLUTION
zerotyper
Frequent Visitor

@carlosbpiolla I hope this is the result you want.

zerotyper_0-1668172664587.png

 

View solution in original post

13 REPLIES 13
zerotyper
Frequent Visitor

@carlosbpiolla I hope this is the result you want.

zerotyper_0-1668172664587.png

 

Anonymous
Not applicable

Thank you @zerotyper !!! That's what I wanted!

v-yueyunzh-msft
Community Support
Community Support

Hi, @Anonymous 

For your need , you can try to use this dax to create a measure :

PPM % = var _t = SUMMARIZE(ALL('Table'[Cod. Forn. Principal]) , 'Table'[Cod. Forn. Principal] , "PPM" , [Impacto_PPM] )
return
DIVIDE([Impacto_PPM],SUMX(_t,[PPM]))

Then we can meet your need , the result is as follows:

vyueyunzhmsft_0-1668053378699.png

 

 

Best Regards,

Aniya Zhang

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

Anonymous
Not applicable

Hello @v-yueyunzh-msft . Thank you for your time and for trying to help!

But just like my reply to our other friend, it didn't work...the results are the same.

cpiolla_0-1668080891154.png

 

Hi , @Anonymous 

Can you check the measure type is "Percentage" in "Measure Tools"?

vyueyunzhmsft_0-1668129278943.png

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

Best Regards,

Aniya Zhang

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

Hey, @v-yueyunzh-msft  !! This is my personal account.

 

What I need is that the column %PPM looks like this.
Remember that both 'Impacto PPM' and '% PPM' are measures and not columns in the original table.

 

Cod. Forn. PrincipalEntradasRefugosImpacto PPM% PPM
160328358.839,001.200,00834,9182,47
1568675016.300,0094,00

65,4

6,46
1569933320.584,0076,0052,885,22
1569512639.720,0060,0041,754,12
153125007.600,0020,0013,921,38
1595630092.589,004,002,780,27
112230003.190,001,000,7

0,069

and many more.........................
TOTAL:1.437.27814551012,34100%

 

Here is the pbix file with this data.

samples.pbix 

 

Thanks again for helping!

 

 

 

johnt75
Super User
Super User

Try this as the measure

Porcentual PPM =
DIVIDE ( [Impacto PPM], CALCULATE ( [Impacto PPM], ALLSELECTED () ) )
Anonymous
Not applicable

First of all, thanks for trying to help me out!
But unfortunately it doesn't work, the numbers don't add up to 100% 😞

cpiolla_0-1668022288601.png

 

FreemanZ
Super User
Super User

Supposing your table named Table, try to add a new column with the code below:
 
Porcentual PPM = FORMAT ( DIVIDE( CALCULATE(SUM('Table'[ Impacto_PPM])), SUM('Table'[ Impacto_PPM])), "00%")
Anonymous
Not applicable

Hi FreemanZ, thanks for helping!
But the 'Impact_PPM' you see on the picture is not an actual column on the table, it's just a measure as a column in a table visual.

 

Can you simplify your report and upload the pbix file?

Hey, @FreemanZ !! This is my personal account.

 

The situation is: the measure 'Porcentual PPM' is supposed to calculate the percentage that each 'Impact PPM' (which is also a measure) has on the total of the 'Impact PPM'. But theres is something wrong and I cant solve it.

Here's the pbix file with a few numbers on it.
samples.pbix 
Thanks again for helping.

It seems you put it on OneDrive, but i couldn't open it. 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors