Forum Discussion

Lars_Denmark's avatar
Lars_Denmark
Frequent Visitor
2 years ago
Solved

Cost allocation with two fact tables

I have run into a problem with distribution that I cannot solve myself, and I therefore hope that there is someone here who can help.       I have two sales tables, consisting of an Invoice...
  • DataNinja777's avatar
    DataNinja777
    2 years ago

    Hi Lars_Denmark ,

    In order for your allocation % to also respect the LineNo filter for your % of sales calculation you can tweak the two dax measures as follows:

    First, modify your denominator of the % of sales measure by including all function to ignore filter for the LineNo field. 

    The above measure is then used in the % calculation in your data model. 

    Also, another part you need to modify is the following measure by including the yellow highlighted part for the same reason as above. 

     

     

    The resultant output produces the consistent output for sales % allocation respecting also the LineNo field.  

    I attach the updated pbix file.  

    Best regards,