Forum Discussion

morgancampbell's avatar
5 years ago
Solved

How to Filter this Measure?

I have a measure which is as below:

 

TWER % LWER =
VAR TWER = CALCULATE(sum('Table'[Email Read]), FILTER(ALL('Table'),'Table'[Week Rank]=max('Table'[Week Rank])))
RETURN
VAR LWER = CALCULATE(sum('Table'[Email Read]), FILTER(ALL('Table'),'Table'[Week Rank]=max('Table'[Week Rank])-1))
RETURN
( IF(
        NOT ISBLANK(TWER),
        DIVIDE(TWER - LWER, LWER)
    )
)
 
 
This measure displays a percentage of this weeks emails read over last weeks emails read. But I have a slicer on the page that allows me to filter by person, however this measure doesn't filter down as it should. I know that is effected by the filter, after I did some testing, but it seems as if it will only filter nothing or filter everything out.
 
How would I go about editing this measure so that when I select a name on the slicer, it filters only the data matching that person?
 
Thanks

2 Replies