Forum Discussion

Veronika3's avatar
Veronika3
Regular Visitor
10 months ago
Solved

Duplicate total despite the filter used

Hello, I need help with this measure.  I have a measure that works correctly only if I do not filter by country. This is how it looks when it’s correct: Meta test = IF (     SELECTEDVALUE ( fil...
  • tamerj1's avatar
    10 months ago

    Hi Veronika3 

    Please try

    Meta test =
    IF (
        SELECTEDVALUE ( filterHide[Text] ) <> "Hide",
        CALCULATE (
            SUM ( factMetaCampaign[SpendEur] ),
            KEEPFILTERS (
                TREATAS (
                    VALUES ( relCampaignSUParticipation[generatedID] ),
                    factMetaCampaign[GeneratedID_PPID]
                )
            ),
            KEEPFILTERS (
                TREATAS (
                    VALUES ( relCampaignSUParticipation[Partner] ),
                    factMetaCampaign[PartnerSUParticipation]
                )
            )
        )
    )