cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnnJ2209
Frequent Visitor

sort by within this week

Hi,

 

I am trying  sort by relativ date, whitin this week - but it takes sunday as first weekday - is there any settings where i can change it ? so it will take 9-11-2020 - 15-11-2020 ?

 

AnnJ2209_0-1605191665635.png

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @AnnJ2209 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

c1.png

 

You may create a measure as below. Today is 11/16/2020. You may remove '-1' to get the result for current week.

Visual Control = 
var d = SELECTEDVALUE('Table'[Date])
var y = YEAR(d)
var wn = WEEKNUM(d,2)
return
IF(
    y=YEAR(TODAY())&&wn=WEEKNUM(TODAY(),2)-1,
    1,0
)

 

Then you need to put the measure in the visual level filter to display the result.

c2.png

 

Best Regards

Allan

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @AnnJ2209 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

c1.png

 

You may create a measure as below. Today is 11/16/2020. You may remove '-1' to get the result for current week.

Visual Control = 
var d = SELECTEDVALUE('Table'[Date])
var y = YEAR(d)
var wn = WEEKNUM(d,2)
return
IF(
    y=YEAR(TODAY())&&wn=WEEKNUM(TODAY(),2)-1,
    1,0
)

 

Then you need to put the measure in the visual level filter to display the result.

c2.png

 

Best Regards

Allan

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

amitchandak
Super User IV
Super User IV

@AnnJ2209 , Other than regional settings I doubt anything you can do to change this. Please log an idea or vote for an idea - https://ideas.powerbi.com/ideas/

 



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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

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.