cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Raul Member
Member

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

Accepted Solutions
Community Support Team
Community Support Team

Re: Select a day and filter by week

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
Super User IV
Super User IV

Re: Select a day and filter by week

Can you explain with an example 





Did I answer your question? Mark my post as a solution!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


Community Support Team
Community Support Team

Re: Select a day and filter by week

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

Raul Member
Member

Re: Select a day and filter by week

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!

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors