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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Not applicable

slicer, non selected values in range slicer from a between slicer

what is the dax query for all values except the selected range


I want to get the value of exp - current which are 2 other measures for the non selected range, 0 to 3(min_hour) and 16 to 23(max_hour) and sum the values for both those non selected ranges

Super User
Super User


Sum outside range =
VAR MinHour =
    MIN ( 'Time'[Hour] )
VAR MaxHour =
    MAX ( 'Time'[Hour] )
VAR ValueMinHour =
    CALCULATE ( [My measure], 'Time'[Hour] < MinHour )
VAR ValueMaxHour =
    CALCULATE ( [My measure], 'Time'[Hour] > MaxHour )
    ValueMinHour + ValueMaxHour
Not applicable

It is returning Null... 

What should it be returning? Are any other slicers or filters affecting the calculation ?

Not applicable

it should get the hours from 0 to min, and max to end value 23, and based on that filtered value, I have to caluclate my measure expenditure - current

That's what it is supposed to do. The 'Time'[Hour] column is intended to be the column you are using in the slicer.

Not applicable

yeah, that is what its supoosed to do, i tried filtering it out also in the same way, but even if the value < start and >end exists, it is returning blak/null, and calculation is not affected by any other slicer


Try creating a temporary table like

Tmp table =
ADDCOLUMNS ( VALUES ( 'Time'[Hour] ), "My Measure", [My Measure] )

and that should confirm whether  the base measure is working or not

Not applicable

for this, i am getting  for every hour in one column, corresponding measure exp - cur

Not applicable

i created a new table of existing and tried filtering out by min val and max val, but it is considering min as 0 and max as 23, that's why its returning blank... it is not taking the slicer min or max when i take it in another measure, but when i put a card and check for minval and maxval it is properly working

Use Performance Analyzer to get the DAX code for the visual which isn't working, and paste it into DAX Studio. That will show you which filters are being applied, and will show whether the slicer is affecting it or not. If it isn't then you need to have a look at Edit Interactions to make sure that the slicer values do get passed across.

Not applicable

I tried that too, it is getting passed to the required charts too...

can you share a PBIX with any confidential info removed ?

Not applicable

I am not in the position to share the file, sorry... the min and max of slicer whenever i use in any calculation is giving  0 and 23(start and end) even if the slicer is changed

Are you sure you're doing the MIN / MAX as a measure and not as a calculated column? Measures should definitely be affected by slicers but columns will not be

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors