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
Raul
Post Patron
Post Patron

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
v-lid-msft
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
v-lid-msft
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.

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!

amitchandak
Super User
Super User

Can you explain with an example 

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.