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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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