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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Pulling data points for one day each week over the last 52 weeks

Good Afternoon,

 

I have been given a request to show production data for every Wednesday for the last year. Is there a dax formula that I could use to isolate these data points? 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Do you have a week day column in your table? If so, you can try a measure like below

wednesday value = CALCULATE ( SUM ( 'Table'[value] ), 'Table'[week day] = "Wednesday" )

 

If you only have Date column, you can use this measure

wednesday value =
CALCULATE (
    SUM ( 'Table'[value] ),
    FORMAT ( 'Table'[Date], "dddd" ) = "Wednesday"
)

or

wednesday value = CALCULATE ( SUM ( 'Table'[value] ), WEEKDAY ( 'Table'[Date], 2 ) = 3 )

 

If this doesn't work, can you please share some dummy data and expected result to show the output you want to get?

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Do you have a week day column in your table? If so, you can try a measure like below

wednesday value = CALCULATE ( SUM ( 'Table'[value] ), 'Table'[week day] = "Wednesday" )

 

If you only have Date column, you can use this measure

wednesday value =
CALCULATE (
    SUM ( 'Table'[value] ),
    FORMAT ( 'Table'[Date], "dddd" ) = "Wednesday"
)

or

wednesday value = CALCULATE ( SUM ( 'Table'[value] ), WEEKDAY ( 'Table'[Date], 2 ) = 3 )

 

If this doesn't work, can you please share some dummy data and expected result to show the output you want to get?

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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