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
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 ) RETURN ValueMinHour + ValueMaxHour
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
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
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.
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
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.