Forum Discussion

Javi77's avatar
Javi77
Frequent Visitor
8 years ago
Solved

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

 

 

THX

  • 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])
    
    )

2 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    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])
    
    )
    • Javi77's avatar
      Javi77
      Frequent Visitor

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