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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
BartzD01
Regular Visitor

Proportionally allocation

Table name "Analysis"

I want to allocate proportionally in one column the amount 50 at Business "B" sales and the anount 100 at Business "W".

So it will be like row be row for business B:

100/(100+150+200+300)*50

150/(100+150+200+300)*50  and so on ...

and for business W:

100/(100+150+200+400)*100

150/(100+150+200+400)*100 and so on...

 

Capture.PNG

1 ACCEPTED SOLUTION

Thank you all for your help.

After long searcing and advised by your solution I wrote the following which works based on me needs.

Column =
Business[Sales]/SWITCH(TRUE(),Business[Business]="B",CALCULATE(SUM(Business[Sales]),FILTER(Business,Business]="B")),

Business[Business]="W",CALCULATE(SUM(Business[Sales]),FILTER(Business,[Business]="W")))

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Try this "Calculated Column"

 

Allocation =
DIVIDE (
    Analysis[Sales],
    SUMX (
        FILTER ( ALL ( Analysis ), Analysis[Business] = EARLIER ( Analysis[Business] ) ),
        Analysis[Sales]
    ),
    0
)
    * SWITCH ( Analysis[Business], "B", 50, "W", 100, 0 )

 

 

Thank you all for your help.

After long searcing and advised by your solution I wrote the following which works based on me needs.

Column =
Business[Sales]/SWITCH(TRUE(),Business[Business]="B",CALCULATE(SUM(Business[Sales]),FILTER(Business,Business]="B")),

Business[Business]="W",CALCULATE(SUM(Business[Sales]),FILTER(Business,[Business]="W")))

dax
Community Support
Community Support

Hi BartzD01,
According to your description, it seems that you want to get result like below

Capture6.PNG

You could try to use below measure to see whether it works or not

Measure = VAR DC = IF(MAX(Table1[Business])="B", 50, 100) return sum(Table1[Sales])/CALCULATE(sum(Table1[Sales]), ALLEXCEPT(Table1,Table1[Business]))*dc

Best Regards,
Zoe Zhi

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.