Forum Discussion

HarryR's avatar
HarryR
Regular Visitor
3 years ago
Solved

Filter Minimum Y-Axis Based on Slicer

Hi all, 

 

This has been something I've been trying to do for some time, and thought I might be able to solve with Field Parameters, but alas I've hit another roadblock.

I'm trying to add a slicer to a chart that would remove all items have less than a specified number of items determined by a slicer. So basically so if the user had filtered the chart to see categories with above 50 items, only A, C, F & G would appear from the below table.

 

CategoryNo. of Items
A59
B26
C85
D23
E19
F65
G53

 

Any ideas on how to achieve this at all?

  • Create a numeric field parameter slicer.

    Then try use something similar to the following DAX as the measure:

    No. Items = 
    var items = CALCULATE(COUNT([Items]), ALLEXCEPT(Table, [Category])
    var minItems = SELECTEDVALUE([Parameter Value])
    return IF(items > minItems, items, BLANK())

     

2 Replies

  • Create a numeric field parameter slicer.

    Then try use something similar to the following DAX as the measure:

    No. Items = 
    var items = CALCULATE(COUNT([Items]), ALLEXCEPT(Table, [Category])
    var minItems = SELECTEDVALUE([Parameter Value])
    return IF(items > minItems, items, BLANK())