Forum Discussion
SUM values slicer in Between option
I need to get on between slicer based on SUM Values
between slicer will work individual line items only
if we move between slicer like greater than 40 it will show in the table only banana value = 44
as we have apple SUM Value = 43 and banana = 44 both should show in the table, how to fix this.
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-slicer-numeric-range
example table
name amount
Apple 10
Orange 22
Apple 33
banana 44
Hello,
you can use this calculated column:Column =SUMX(FILTER('Table',[name]=EARLIER('Table'[name])),[amount])and use it for slicer
result could be like this:we are getting a also because total value is 4
if this helps, please mark as solution
15 Replies
- Akash_Varuna
Super User
Anonymous For this, create a measure like Total Amount = SUM('Table'[Amount]) and use it in the slicer. The slicer will now filter based on the total sum, showing both Apple and Banana if their combined value meets the condition.
- AnonymousNot applicable
I understood as we need between option to see user
- DataNinja777
Super User
Hi Anonymous ,
In Power BI, a standard "Between" slicer works on individual row values, not on aggregated values like the sum of amounts per name. In your example, the slicer on amount would only include rows where the individual amount is greater than 40, which is why only Banana (44) shows up, and Apple (10 and 33) gets excluded—even though its total is 43. To fix this and apply the slicer based on the sum of amounts per name, you’ll need to create a summary table that groups data by name and calculates the total amount. Use this table as the basis for your slicer, and then filter the original table accordingly.
First, create a summarized table using DAX like this:
NameSummary = SUMMARIZE( 'YourTable', 'YourTable'[name], "TotalAmount", SUM('YourTable'[amount]) )This gives you a new table with unique names and their total amounts. You can then create a slicer on the TotalAmount column from the NameSummary table. Since slicers and visual filters don’t automatically filter the original table by aggregation, you need a measure to bridge the logic between the two.
Define a DAX measure like this:
ShowNameFlag = VAR SelectedMin = MIN('NameSummary'[TotalAmount]) VAR SelectedMax = MAX('NameSummary'[TotalAmount]) VAR ThisName = SELECTEDVALUE('YourTable'[name]) VAR ThisTotal = CALCULATE( SUM('YourTable'[amount]), ALLEXCEPT('YourTable', 'YourTable'[name]) ) RETURN IF( ThisTotal >= SelectedMin && ThisTotal <= SelectedMax, 1, 0 )Apply this measure as a visual-level filter in your table where ShowNameFlag = 1. This way, the table visual will only show names whose total amount falls within the selected range in the slicer—even though the original table still contains individual line items. This workaround bypasses the slicer's limitation and gives you the correct aggregated filtering behavior.
Best regards,
- AnonymousNot applicable
I created formula suggested DAX Function as not getting result the same , do you have sample dataset created similar to this
- AnonymousNot applicable
I'm not getting the same result and Do you have same data so i can refer it
- mh2587
Super User
Create a calculated table or measure to filter based on SUM per name, not row-level values.
Create a measure to calculate the sum of amount by name:
TotalAmountByName = CALCULATE(SUM('Table'[amount]), ALLEXCEPT('Table', 'Table'[name]))
Create a new disconnected table for your slicer:SlicerTable = GENERATESERIES(0, 100, 1)
This gives values 0 to 100 for use in the slicer.Create a measure to capture selected value from slicer:
SelectedMinAmount = SELECTEDVALUE(SlicerTable[Value], 0)
Create a measure for filtering visual rows:ShowName = VAR TotalAmt = CALCULATE(SUM('Table'[amount]), ALLEXCEPT('Table', 'Table'[name])) RETURN IF(TotalAmt >= [SelectedMinAmount], 1, 0)
Apply this as a visual-level filter on your table:Go to your visual.
Add the ShowName measure to the Filters pane.
Set it to show only when value = 1.
- AnonymousNot applicable
I created formula suggested DAX Function as not getting result the same , do you have sample dataset created similar to this.
- AnonymousNot applicable
Hi - I'm not getting the same result and Do you have same data so i can refer it
- Vijay_Chethan
Resolver III
Hello,
you can use this calculated column:Column =SUMX(FILTER('Table',[name]=EARLIER('Table'[name])),[amount])and use it for slicer
result could be like this:we are getting a also because total value is 4
if this helps, please mark as solution - v-sdhruv
Community Support
Hi Anonymous ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You - v-sdhruv
Community Support
Hi Anonymous ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You - v-sdhruv
Community Support
Hi Anonymous ,
I have tried to reproduced the scenario using the measure provided by Vijay_Chethan and was able to get the result.
Please find the file attcahed.
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You!- AnonymousNot applicable
Thanks for update!
I've added two columns in the table for Year, Quarter after adding columns I am using filter = year as its not working for Slicer measure for range between, how to fix in slicer measure include in year/quarter.
Slicer = SUMX(FILTER('Table',[name]=EARLIER('Table'[name])),[amount])Here is table for sample dataset
Name Amount year quarter slicer Apple 10 2025 1 Apple 25 2024 1 Apple 35 2025 3 Orange 22 2025 4 Apple 33 2025 1 Banana 44 2024 1 Orange 5 2025 4 Banana 11 2025 2 Grape 50 2025 3 Apple 5 2024 3 Mango 20 2025 1 Mango 25 2024 1 example : apple filter 2024 then slicer range should get change = 25 ----- 44 like wise 2025 as not here
- v-sdhruv
Community Support
Hi Anonymous ,
You can try to use this-
Slicer Measure =
CALCULATE(
SUM('Table'[Amount]),
ALLEXCEPT('Table', 'Table'[Name], 'Table'[Year], 'Table'[Quarter])
)
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You!