Forum Discussion

notofrugo90's avatar
notofrugo90
Regular Visitor
9 months ago
Solved

I don't understand filter propagation.

Please disregard what I want to achieve here. My question is purely about technial part of DAX and relationships in Power BI.

 

My question is about this strange behavior of DAX which I don't understand. My measure should simply count rows in DIM_VENDING_MACHINE and somehow values returned by this measure are affected by DIM_CUSTOMER. Why? I should get exactly the same number in each row of that table since filter cannot be propagated from DIM_CUSTOMER to DIM_VENDING_MACHINE because of the filter direction between DIM_VENDING_MACHINE and FAC_SALES_VENDING.

I have already achieved what I wanted. I just don't understand this behavior I noticed. And I like to understand how things work.

 

 

  • "Follow the arrows."  Can you get there from here?  In your case you cannot get from the Customer dimension to the Vending Machine dimension, as the arrows don't cooperate.  So Power BI is giving you a fake result.  

     

    In your case you would need to use the Fact table and Filter transfer (via TREATAS for example) to calculate how many vending machines each customer has used in their purchases.

9 Replies

  • "Follow the arrows."  Can you get there from here?  In your case you cannot get from the Customer dimension to the Vending Machine dimension, as the arrows don't cooperate.  So Power BI is giving you a fake result.  

     

    In your case you would need to use the Fact table and Filter transfer (via TREATAS for example) to calculate how many vending machines each customer has used in their purchases.

    • v-menakakota's avatar
      v-menakakota
      Icon for Community Support rankCommunity Support

      Hi notofrugo90 ,
      Thanks for reaching out to the Microsoft fabric community forum. 

       

      I would also take a moment to thank lbendlin   , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

      I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .

       

       

      Best Regards, 
      Community Support Team  

      • v-menakakota's avatar
        v-menakakota
        Icon for Community Support rankCommunity Support

        Hi notofrugo90 ,

        I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We’re always here to support you .

         

         

        Best Regards, 
        Community Support Team  

    • juan_pablo's avatar
      juan_pablo
      Icon for Helper V rankHelper V

      lbendlin 

      What do you mean by "fake results"? It should not affect the result per customer. Why is COUNTROWS(DIM_VENDING_MACHINE) being affected by DIM_CUSTOMER? Can you elaborate on this please?

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        You will get all vending machines for all customers, regardless of the filter choice on DIM_Customer if you use the dimension column.  If you use the fact column you get a meaningful result

         

         

  • Hi notofrugo90, is the "Customer Number" you're using in the table from your Dim_Customer or your "Fact_Sales_Vending"? If it's from your Dim_Customer the other dimension should not impact the count in any way. If the column is from your fact table it makes sense though, since your fact table is filtered by Dim_Vending_Machine, so the countrows gets evaluated on each row that can be found in the current filter context in your fact table.