Forum Discussion

jaryszek's avatar
jaryszek
Icon for Super User rankSuper User
11 months ago
Solved

How to get answer for question, How many Tags per resource I have?

Hello, My model is: nad now i want to get answer for a question: How many Tags per resource I have? Tried to use measure: New_Resources Count = DISTINCTCOUNT ( 'Dim_EA_Resource_Brid...
  • Anonymous's avatar
    Anonymous
    10 months ago

    Hi jaryszek,

    Thank you  for reaching out to the Microsoft fabric community forum.

    The main reason you are getting a constant value is that the filter from the Tag table is not reaching the bridge table in your actual model. Because of this, Power BI is counting all resources every time, instead of only the resources for the selected tag. That’s why your SQL query shows different counts, but the DAX measure gives the same number.

    In your sample Product Tag model it works because the relationships allow the filter to flow correctly. But in your real model the filter direction is blocking it.

    You can fix this by Turning on bidirectional filter on the relationship used for this calculation or Using a DAX measure that forces the filter to pass through.

    After this, the DISTINCTCOUNT will respond correctly for each tag.

    Hope the above provided information help you resolve the issue, if you have any further concerns or queries, please feel free to reach out to us.
    Regards,
    Coummunity support Team.