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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SSGUY
Frequent Visitor

Getting Z-Score to calculate based off of a "Weekday" Slicer

Z-Score Winter =
VAR _Athlete = 'Data'[Athlete]
VAR _Today = 'Data'[Session Load]
VAR _StartDate = DATE(2023,1,19)
VAR _EndDate = TODAY()
VAR _Average =
AVERAGEX(
FILTER( ALL ( 'Data' ), 'Data'[Athlete] = _Athlete && 'Data'[Date] >= _StartDate && 'Data'[Date] <= _EndDate),
'Data'[Session Load]
)
VAR _sd =
STDEVX.P(
FILTER( ALL('Data'), 'Data'[Athlete] = _Athlete && 'Data'[Date] >= _StartDate && 'Data'[Date] <= _EndDate),
'Data'[SessionLoad]
)
RETURN
(_Today - _Average) / _sd

Hey everyone, working on displaying Z-Scores on a graph, but having some trouble with one part. At some point I want to compare Mondays only to Mondays, and Tuesdays only to Tuesdays, Ect. At this point it is taking into consideration each day of the week and anything between the dates I have specified. I also like to see this, so im just wondering if there is a way to write this so that if i have a slicer with "Weekday" it will recalculate. At the moment, this is a column calc. Just wondering if anyone has a solution here.
 
Thanks!Capture.PNG
1 REPLY 1
amitchandak
Super User
Super User

@SSGUY , if you want to compare with last week day , you can use a measure like with help from dat table

 

7 behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAy))

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.