cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

Select a day and filter by week

Hello,
I need to present the records in a table for a week, but I want to select a day of the week. That is, after filtering for a year and a month, I want to select a day of that month and the table shows me the data of the week to which that day belongs. Is it possible to do it automatically, without creating DAX functions, by segmentation? When selecting a day in a segmentation, the week to which the day belongs in another segmentation is displayed.
Thank you very much for your help.

1 ACCEPTED SOLUTION
Community Support
Community Support

Hi @Raul ,

 

Based on my research, it is nearly impossbile to complete without any DAX formula. So I provide a workaround using simple DAX formula.

 

Firstly, Create a Calculate Column in the origin table using following formula

 

WeekNum = WEEKNUM([Date])

Then create a Calculated Table using following formula.

 

Table 2 = ADDCOLUMNS(CALENDAR(MIN('Table'[Date]),MAX('Table'[Date])),"Week",WEEKNUM([Date]))

At last, make relation between two tables based on the Week Column ( do not use the date column)

You can also use the year-month column just keep the two column has same value. And use the date column in Table2 as the field of the slicer

 

2.PNG

 

 

3.PNG4.PNG

 

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @Raul ,

 

Based on my research, it is nearly impossbile to complete without any DAX formula. So I provide a workaround using simple DAX formula.

 

Firstly, Create a Calculate Column in the origin table using following formula

 

WeekNum = WEEKNUM([Date])

Then create a Calculated Table using following formula.

 

Table 2 = ADDCOLUMNS(CALENDAR(MIN('Table'[Date]),MAX('Table'[Date])),"Week",WEEKNUM([Date]))

At last, make relation between two tables based on the Week Column ( do not use the date column)

You can also use the year-month column just keep the two column has same value. And use the date column in Table2 as the field of the slicer

 

2.PNG

 

 

3.PNG4.PNG

 

 

 

BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Excellent @v-lid-msft !

Yes, I have also tried and searched how to do it without DAX formulas but I haven't found anything.

Thank you very much for your help, solution and example. You are a pro!

Super User IV
Super User IV

Can you explain with an example 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite with Arun Ulag

Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI ​

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors