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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Vaishakraju
New Member

Calculation of the sum of different status and dividing by total value.

Hello everyone ,

I have a sharepoint list with different part numbers and status (Work in Progress, Finished , Packed). As mentioned below:

I need to caluculate the percentage of each Status value and show all the status percentage values in a graph.

But ineed to divide each Status value by a total( Say 40) Beacuase the total number of parts to be produced or the Work Order is 40 and i need to know the overall status. HOw can i do it?

For Ex. Count of Status  Finished =1, So total percentage = 1/40

Similarly,  Count of Status Packed = 2, Total%=2/40

Count of Status Packed= 2, Total%=2/40

The rest 35 Parts still needs to be worked Total%= 35/40

This data i need to show as a Graph

Part NumberStatus
254_AFinished
255_BPacked
255_BPacked
256_AWork in Progress
257_AWork in Progress

 

It would be great if you can help me out

 

Thanks

4 REPLIES 4
Vaishakraju
New Member

HI Dino @Anonymous @, Thankyou for the detailed solution.

In your case above there are 10 parts in the table,  so For finshed column it is 5/10= 50%.  its correct

But i need to calculate the percentage of the total  number of parts in a work order as i explained in my Question which is 40. So in my case it should show 5/40= 12.5% as the finished percentage value.

All the 40Parts may not be in the table but it has to consider the whole work order of 40parts

Anonymous
Not applicable

Hi @Vaishakraju ,

Are you trying to say that you have a total of 40 parts, but not all of those 40 exist in the datasheet? For example, there may be only 30 parts recorded in the table, but you still want to calculate the proportion based on the total number of 40, right?

If so, you can try to modify the three DAXs for calculating precentages to read as follows:

Finish percentage = DIVIDE([TotalFinish], 40)
Packed percentage = DIVIDE([TotalPacked], 40)
Work in Progress percentage = DIVIDE([TotalWork in Progress], 40)

And now, the final output is shown in the following figure:

vjunyantmsft_0-1698307418183.png

If you change the total number of parts later, for example, say to 50 parts, you only need to change '40' of the three DAXs to '50'.

 

Best Regards,

Dino Tao

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

 

Anonymous
Not applicable

And if you mean that these 40 parts are all in the datasheet, but there are duplicates, such as in your original question 255_B which appears twice:

vjunyantmsft_0-1698311335690.png

Because duplicate records affect the final calculation result, you can modify the DAX statement that calculates the the sum of different status as follows:

 

 

TotalFinish = CALCULATE(DISTINCTCOUNT('Table'[Part Number]),'Table'[Status] = "Finished")

 

 

The other two also change 'COUNT' into 'DISTINCTCOUNT'.

This eliminates the effect of duplicate columns.

Anonymous
Not applicable

Hi, @Vaishakraju ,

You can use the following DAX to calculate the sum of different status:

TotalFinish = CALCULATE(COUNT('Table'[Part Number]),'Table'[Status] = "Finished")
TotalPacked = CALCULATE(COUNT('Table'[Part Number]),'Table'[Status] = "Packed")
TotalWork in Progress = CALCULATE(COUNT('Table'[Part Number]),'Table'[Status] = "Work in Progress")

And you can use the following DAX to calculate each state as a percentage of the total:

Finish percentage = DIVIDE([TotalFinish], COUNT('Table'[Part Number]))
Packed percentage = DIVIDE([TotalPacked], COUNT('Table'[Part Number]))
Work in Progress percentage = DIVIDE([TotalWork in Progress], COUNT('Table'[Part Number]))

The final output is shown in the following figure:

vjunyantmsft_0-1698285393696.png

Best Regards,

Dino Tao

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

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors