Forum Discussion

lfrigione's avatar
lfrigione
Helper II
4 years ago
Solved

PowerBI relations

Hi, I have three tables: Facility(FacilityId, FacilityName, ...) AgeRange(AgeRangeId, minAge, maxAge, FacilityId, ...) ClientPeriod(ClientId, From, To, AgerangeId, FacilityId, ...) I have two ac...
  • Anonymous's avatar
    Anonymous
    4 years ago

    HI lfrigione,

    It seems like userelationship and RLS conflicts with the real and virtual relationship mappings.
    Have you try to removing the virtual relationship and manually using the DAX expression to apply a filter in your calculations?

     

    Test =
    VAR inativeFilter =
        VALUES ( AgeRange[AgeRangeId] )
    RETURN
        CALCULATE (
            COUNTROWS ( ClientPeriod ),
            FILTER ( ALLSELECTED ( ClientPeriod ), [AgeRangeId] IN inativeFilter )
        )

     

    Regards,

    Xiaoxin Sheng