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

create a range filter using a measure

Hello,

I have seen similar topics but none of them solve what I'm looking for.

I have created a measure that counts the business days from the most recent sale of an item by item category.

I have a matrix that shows the category and the number of business days that the most recent sale was made of an item from that category.  It looks somenthing like this:

 

category:                  food / clothes / x / y / z

days since last sale:   36  /       4    / 3 / 7 / 87     

 

I would like to create a range filter in order to filter the "days since last sale".

So for example if the filter is >10 then i would only see the categories "food" and "z".

 

I have seen that I can not use a measure to create a slicer so how can this be worked-around? 

1 ACCEPTED SOLUTION
Super User IV
Super User IV

@Dev13 

You can go to Modeling Tab, Click on New Parameter, and enter a value range to select, modify your measure as follows. It will allow you to show only the days that fall greater than or qual to the selected value. 

New Meaure = 
IF(
    [Your Measure] >  SELECTEDVALUE(Parameter[Parameter]),
     [Your Measure],
     BLANK()
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn




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

Proud to be a Super User!

Website   YouTube    LinkedIn

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@Dev13 , you can not create a slicer on a measure. You need to create an independent bucket table and use that in measure along with group by(Values) in new measures.

Refer my video for that, the link for the file given there - https://youtu.be/CuczXPj0N-k



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Super User IV
Super User IV

@Dev13 

You can go to Modeling Tab, Click on New Parameter, and enter a value range to select, modify your measure as follows. It will allow you to show only the days that fall greater than or qual to the selected value. 

New Meaure = 
IF(
    [Your Measure] >  SELECTEDVALUE(Parameter[Parameter]),
     [Your Measure],
     BLANK()
)

 

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn




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

Proud to be a Super User!

Website   YouTube    LinkedIn

View solution in original post

Thank you so much Fowmy. I did not know about "What if parameters".
this has solved my issue 🙂 

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors