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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply

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
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@morgancampbell , In this Please, move week, week rank to week table. Create a Separate Week/date table have week Rank there.

That is the best way to make it work.

 

TWER % LWER =
VAR TWER = CALCULATE(sum('Table'[Email Read]), FILTER(ALL('Week'),'Week'[Week Rank]=max('Week'[Week Rank])))
RETURN
VAR LWER = CALCULATE(sum('Table'[Email Read]), FILTER(ALL('Week'),'Week'[Week Rank]=max('Week'[Week Rank])-1))
RETURN
( IF(
NOT ISBLANK(TWER),
DIVIDE(TWER - LWER, LWER)
)
)

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@morgancampbell , In this Please, move week, week rank to week table. Create a Separate Week/date table have week Rank there.

That is the best way to make it work.

 

TWER % LWER =
VAR TWER = CALCULATE(sum('Table'[Email Read]), FILTER(ALL('Week'),'Week'[Week Rank]=max('Week'[Week Rank])))
RETURN
VAR LWER = CALCULATE(sum('Table'[Email Read]), FILTER(ALL('Week'),'Week'[Week Rank]=max('Week'[Week Rank])-1))
RETURN
( IF(
NOT ISBLANK(TWER),
DIVIDE(TWER - LWER, LWER)
)
)

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Spoiler
@amitchandak , How do I go about creating a new a week/date table with only the relevant dates, as opposed to all dates up until the end of the year?

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors