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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
njxfoster
Helper I
Helper I

Adding description to time measure

Hi Guys 

 

I have set a weekending measure to show the week starting date vs. the week ending date

njxfoster_0-1670972119912.png

njxfoster_1-1670972162308.png

 

For X-axis, is there a way I can change the display from showing "November 20" to " Week of 11/20"? 

 

 

Thanks in advance!

 

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

Hi  @njxfoster ,

I created some data:

vyangliumsft_0-1670981857137.png

Here are the steps you can follow:

1. Create calculated column.

Week = WEEKNUM('Table'[Date],2)
mindate =
var _weeknum=WEEKNUM('Table'[Date],2)
var _weekday=WEEKDAY('Table'[Date],2)
return
MINX(FILTER(ALL('Table'),'Table'[Week]=EARLIER('Table'[Week])),[Date])
Flag = "Week of" &" "& MONTH('Table'[mindate])&"/"&DAY('Table'[mindate])

2. Add Column – Index Column – From 1.

vyangliumsft_1-1670981857141.png

3. Create calculated table.

Table2 =
SUMMARIZE('Table','Table'[Flag],"Index",MINX(FILTER(ALL('Table'),'Table'[Flag]=EARLIER('Table'[Flag])),[Index]))

vyangliumsft_2-1670981857142.png

4. Join the relationship between two tables.

vyangliumsft_3-1670981857143.png

5. Column[Flag] – Column tools – Sort by column -- [Index] .

vyangliumsft_4-1670981857147.png

6. Result:

vyangliumsft_5-1670981857150.png

 

Best Regards,

Liu Yang

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
njxfoster
Helper I
Helper I

Hi Guys 

 

I have set a weekending measure to show the week starting date vs. the week ending date

njxfoster_0-1670972119912.png

njxfoster_1-1670972162308.png

 

For X-axis, is there a way I can change the display from showing "November 20" to " Week of 11/20"? 

 

 

Thanks in advance!

 

Anonymous
Not applicable

Yes but I don't believe it would ever be recommended.

 

The formula you have utilises data type Date or Date/Time. This maintains chronological settings.

 

You could create a custom column using the following code:

WeekOf = "Week Of " & FORMAT([WeekEnding], "mm/dd")
 
This introduces a host of issues though relating to data control due to a change in data types. To put "week of" into a column means your data type changes to Text. You will lose chronological control and your columns will be shown alphabetically (or alphanumerically based on the digit assignment). The only real way to control this would then be to create a separate table that has a ranking column next to it so you could list them in the order you want to.
 
If this is due to user preference then education/expectations management is key. 
v-yangliu-msft
Community Support
Community Support

Hi  @njxfoster ,

I created some data:

vyangliumsft_0-1670981857137.png

Here are the steps you can follow:

1. Create calculated column.

Week = WEEKNUM('Table'[Date],2)
mindate =
var _weeknum=WEEKNUM('Table'[Date],2)
var _weekday=WEEKDAY('Table'[Date],2)
return
MINX(FILTER(ALL('Table'),'Table'[Week]=EARLIER('Table'[Week])),[Date])
Flag = "Week of" &" "& MONTH('Table'[mindate])&"/"&DAY('Table'[mindate])

2. Add Column – Index Column – From 1.

vyangliumsft_1-1670981857141.png

3. Create calculated table.

Table2 =
SUMMARIZE('Table','Table'[Flag],"Index",MINX(FILTER(ALL('Table'),'Table'[Flag]=EARLIER('Table'[Flag])),[Index]))

vyangliumsft_2-1670981857142.png

4. Join the relationship between two tables.

vyangliumsft_3-1670981857143.png

5. Column[Flag] – Column tools – Sort by column -- [Index] .

vyangliumsft_4-1670981857147.png

6. Result:

vyangliumsft_5-1670981857150.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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