Forum Discussion

baronraghu's avatar
baronraghu
Helper III
8 years ago
Solved

DAX help

Hi All,   I am stuck in a simple problem hope you could help   I have two tables   Table 1 has data on the details of the retail outlet   RO name   Fuel sold A                 Gasoline A   ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    Make sure the relationship is setup as "both" not "single" under Cross Direction Fitler. I was able to get it to work with a model like this:

     

  • GabrielSantos's avatar
    GabrielSantos
    8 years ago

    Actually, I'm not sure the figures you have are meaningful. Your sales table has an outlet indicator (A,B,C), but no fuel type indicator. Because each outlet sells multiple types of fuel, it's impossible to attribute any sale to a specific fuel type.

     

    The reason you see $4,265 for Diesel and Gasoline and $3,266 for Kerosene are because Diesel and Gasoline are sold at A,B, and C where Kerosene is only sold at A and C.

     

    What happens is the FuelType table is filtered by fuel type, and that filter carries forward through the bi-directional filter to the Sales table.

     

    The Sales table can only be filtered by the outlet type (A,B,C). Therefore, for Kerosene, the outlets of A and C are carried forward to the Sales table and the amount is summed and returned.