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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Mani_1
Frequent Visitor

Distribution of values based on other table

Hi,

Is it possible to distibute the values based on two tables? I have two tables both are connected via Key, by one to many relationship. Now when i use the matrix then i have the result below

Mani_1_0-1693827959504.png

But i want to distibute the revenues values  of x-company into the following:

Mani_1_1-1693828187354.png

The sample data is as follows:

Table1

Mani_1_3-1693828431795.png

Table2

Mani_1_2-1693828347611.png

Thanks in advance

@parry2k @amitchandak @Greg_Deckler 

2 REPLIES 2
amitchandak
Super User
Super User

@Mani_1 ,

New column in Table 2=

var _val = sumx(filter(Table1, Table1[Key] = Table2[Key] && Table1[Compay] = Table2[Invoice Recipent]) , Table1[Revenue])

var _st = sumx(filter(Table2, Table2[Key]= earlier(Table2[Key]) && Table2[Invoice Recipent]=  earlier(Table2[Invoice Recipent])) , Table2[Invoice Amount])

return

divide([Invoice Amount], _st)*_val

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

The code doesn't work.

 

Helpful resources

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

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.