Forum Discussion
ashu710
4 years agoFrequent Visitor
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...
- 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 _ifBest Regards,
Community Support Team _ Zeon ZhengIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-angzheng-msft
4 years agoCommunity Support
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.