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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Javi77
Frequent Visitor

M2M Dax Formula

Hi all,

 

I am trying to calculate the Sales per door with dax, but i need some help In my scenario.


My sales table have sales per costumer, but, i have another table whith the % of distribution per door and the totals are

wrong.

You can get the sample data Here..

 

image1.png

 

THX

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @Javi77

 

I think this calculated measure gets pretty close.

 

AmountPerDoor = 
IF(
    ISFILTERED('Door_Location2'[Costumer]),
    -- THEN --
    [%Dist_per_door]*[Amount_by Costumer],
    -- ELSE --
    SUMX(ALL('Door_Location2'[Costumer]),[%Dist_per_door]*[Amount_by Costumer])

)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @Javi77

 

I think this calculated measure gets pretty close.

 

AmountPerDoor = 
IF(
    ISFILTERED('Door_Location2'[Costumer]),
    -- THEN --
    [%Dist_per_door]*[Amount_by Costumer],
    -- ELSE --
    SUMX(ALL('Door_Location2'[Costumer]),[%Dist_per_door]*[Amount_by Costumer])

)

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

its works!!!
Thank you so much...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.