Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Ignore filters in measure

Writer Matthew Barrera

I've this Measure in Power BI to calculate the average value ignoring low values (lower than the complete average previously calculated)

Measure = var T1 = SUMMARIZE(RAD,RAD[deviceid],"SUMDEVICE",SUM(RAD[data])) VAR AVGDEVICE = AVERAGEX(T1,[SUMDEVICE]) RETURN AVERAGEX(T1, IF([SUMDEVICE]>=AVGDEVICE,[SUMDEVICE]))/1000

In this page I have two slices, one to select a time range and other to select a device. In this case, for this measure I want to ignore the device filter from the slicer, only with the date filter.

The RAD table is simple, and it is something like this, I have 4 devices and data for all the days of the year:

DateDeviceIdData
01/01/2022A100
01/01/2022B120
01/01/2022C90
01/01/2022D74

I can't find how to ignore this filter and have a fixed value for the selected time range in the slicer.

Thanks!

1 Answer

Try this one.

Measure =
var T1 = CALCULATETABLE( SUMMARIZE(RAD,RAD[deviceid],"SUMDEVICE",SUM(RAD[data])) ,ALL(RAD[deviceid]) -- works if the slicer is of this column or change to the proper tableName[columName] )
VAR AVGDEVICE = AVERAGEX(T1,[SUMDEVICE])
RETURN AVERAGEX( FILTER( T1 ,[SUMDEVICE]>=AVGDEVICE ) ,[SUMDEVICE] )/1000
7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.