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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ashisha11
Frequent Visitor

Need Help in calculating Category wise Percentage

Hello experts,

I am struggling finding the right formula for a measure.

I have this table

Nic1.PNG

And would like to come to this type of results

 

Nic2.PNG

 

So a formula that calculates the sum of Qty per Code / total Qty

 

In this case :

-          A = (80+20+15) / (100+20+20+10+20)

-          B = 10 / (100+20+20+10+20)

-          C = 5 / (100+20+20+10+20)

 

I would like to have the formula that will allow doing this.

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@ashisha11 

Use this measure. 

Insert Code and this measure in a Table Visual

Measure  = 
DIVIDE(
    SUM(Table[QTY]),
    CALCULATE(
        SUM(Table[QTY]),
        ALL(Table)
    ) 
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@ashisha11 

Use this measure. 

Insert Code and this measure in a Table Visual

Measure  = 
DIVIDE(
    SUM(Table[QTY]),
    CALCULATE(
        SUM(Table[QTY]),
        ALL(Table)
    ) 
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.