cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rajat_1284
Helper I
Helper I

Getting a custom slicer

Hi,

 

I have two slicers, both which filter data on numerical value columns. I don't wish to have range, just a single cell for each of the slicers where a user inputs the two values and i get the data which follows any one of the conditions.

I have tried the greater than visual but it still gives two boxes and greys out the maximum one which doesn't look tidy. Is there anything else possible?

 

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @rajat_1284 

According to your description, I can roughly understand your requirement, I think you can achieve this using two calculated tables and a measure, you can try my steps:

  1. Create two calculated tables like this:

 

Slicer1 = SUMMARIZE('Data',[Value])
Slicer2 = SUMMARIZE('Data',[Value])

 

  1. Create a measure like this:

 

Flag =

var _range1=ALLSELECTED(Slicer1[Value])

var _range2=ALLSELECTED(Slicer2[Value])

return

IF(MAX('Data'[Value]) in _range1||MAX('Data'[Value]) in _range2,1,0)

 

  1. Then you can create two slicers to place the two new table columns and a table chart to apply a visual filter on this chart like this:

v-robertq-msft_0-1623828909603.png

 

 

And you can get what you want, like this:

v-robertq-msft_1-1623828909605.png

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

View solution in original post

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @rajat_1284 

According to your description, I can roughly understand your requirement, I think you can achieve this using two calculated tables and a measure, you can try my steps:

  1. Create two calculated tables like this:

 

Slicer1 = SUMMARIZE('Data',[Value])
Slicer2 = SUMMARIZE('Data',[Value])

 

  1. Create a measure like this:

 

Flag =

var _range1=ALLSELECTED(Slicer1[Value])

var _range2=ALLSELECTED(Slicer2[Value])

return

IF(MAX('Data'[Value]) in _range1||MAX('Data'[Value]) in _range2,1,0)

 

  1. Then you can create two slicers to place the two new table columns and a table chart to apply a visual filter on this chart like this:

v-robertq-msft_0-1623828909603.png

 

 

And you can get what you want, like this:

v-robertq-msft_1-1623828909605.png

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

View solution in original post

Hi,

 

Thank you for this. The solution feels like almost close but it's not working exactly.

 

Since i have two slicers created for two of my columns.

 

Slicer 1 which is linked to column A

Slicer 2 Which is linked to column B

 

Then the flag logic is something which i am not able to understand.

 

In the table i am actually getting Name and then these Column A & B to check if its working. But the selection doesn't seem to work.

The table in the visual i am referring to the original file column A & B whereas the slicers are coming from the slicer1 and slicer 2.

 

I don't seem to understand the max logic with it.

If slicer1 selections gives range of min and max

slicer 2 gives its own range of min and max

We are referring to max of the original column in range of slicer (min, max) || max of second original column in range of slicer2. 

If i had Table like

 

          Column A        Column B

ABC     50                      0

ABC     100                     20

DEF       100                  0 

DEF      0                        0

 

I would see two rows such as 

ABC      150           20

DEF       100            0

 

So if a slicer for 1 is given as 110 and for slicer 2 is given as 0, i should get both the entries 

If its 100 and 10 , then only ABC should be seen.

 

parry2k
Super User III
Super User III

@rajat_1284 you can create two what-if parameters and turn off slider, it will leave with a box to input the value:

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors