Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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 Date Slicer says "01-01-2022" to "07-01-2022" the visual should show "3" and if the Duplicate/Original says "Duplicate" in the same date range, the visual should show 4. Thanks.
Solved! Go to Solution.
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.
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.
Wow, didn't fancy waiting a few hours for your answer on the other thread, huh?
I'll close off the old thread as you now have this one open as well.
FWIW, I'd be interested to know why you need to add this amount of complexity into your reporting when 99% of the time just displaying the two measures I gave you in the other thread would more than suffice.
Pete
Proud to be a Datanaut!
Hi @BA_Pete there's reporting that needs to be done on an urgent basis. I had already presented the solution you sent to my manager, and he thought that this would be an ideal solution. A few more calculations would be based off those measures, which I am unable to present using the given solution. Thanks.
Ashu
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
69 | |
61 | |
18 | |
16 | |
13 |