Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pbrainard
Helper III
Helper III

Filter by Measure Amount (1k, 5k, 10k...)

I have a list of Donor Names and I want to be able to have a slicer that shows Donors that donated up to $1k, between 1k and 5k, 5k to 10k, etc.) I don't know where to start! 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pbrainard ,

 

Please try the measure and apply it as a visual-level filter.

 

Measure = 
VAR _sum =
    SUM ( 'Table'[Amount] )
VAR range =
    SWITCH (
        TRUE (),
        _sum < 1000, "< 1k",
        _sum < 5000, "1k - 5k",
        _sum < 10000, "5k - 10k",
        ">= 10k"
    )
RETURN
    COUNTROWS ( FILTER ( 'Table', range IN VALUES ( Slicer[Range] ) ) )

winniz_0-1660034403528.png

winniz_1-1660034414703.png

 

My PBIX file: Filter by Measure Amount.pbix

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

4 REPLIES 4
Anonymous
Not applicable

Hi @pbrainard ,

 

Please try the measure and apply it as a visual-level filter.

 

Measure = 
VAR _sum =
    SUM ( 'Table'[Amount] )
VAR range =
    SWITCH (
        TRUE (),
        _sum < 1000, "< 1k",
        _sum < 5000, "1k - 5k",
        _sum < 10000, "5k - 10k",
        ">= 10k"
    )
RETURN
    COUNTROWS ( FILTER ( 'Table', range IN VALUES ( Slicer[Range] ) ) )

winniz_0-1660034403528.png

winniz_1-1660034414703.png

 

My PBIX file: Filter by Measure Amount.pbix

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thank you, this works great!!

Another method (if you add Upper and Lower columns to your slicer table):

Measure_2 = 
CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        'Table',
        'Table'[Amount] > MIN('Range'[Lower])
            && 'Table'[Amount] <= MAX('Range'[Upper])
    )
)

If you add another category to your slicer table, this method won't require any changes.

 

littlemojopuppy
Community Champion
Community Champion

Hi @pbrainard 

 

Do you have some sample data to play with?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (4,954)