Forum Discussion

ashu710's avatar
ashu710
Frequent Visitor
4 years ago
Solved

Duplicates using Date and Duplicate/Original Slicer

Hi all, I would like to implement two slicers on a table similar to the one below. One for date and the other one for duplicates. For example, if the Duplicate/Original slicer says "Original" and Dat...
  • v-angzheng-msft's avatar
    4 years ago

    Hi, ashu710 

    Try this:

    result =
    VAR _originalValues =
        DISTINCTCOUNT( yourTable[valuesColumn] )
    VAR _duplicateValues =
        COUNT( yourTable[valuesColumn] ) - _originalValues
    VAR _if =
        SWITCH(
            TRUE(),
            SELECTEDVALUE( 'theTable'[Slicer] ) = "Original", _originalValues,
            SELECTEDVALUE( 'theTable'[Slicer] ) = "Duplicate", _duplicateValues
        )
    RETURN
        _if
    

     

     

    Best Regards,
    Community Support Team _ Zeon Zheng

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.