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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
erhan_79
Post Prodigy
Post Prodigy

Date hierarchy in Slicer

Hi There ;

 

İ need your support about below issue , in the filter slicer , when we add a date formatted column system opens us a date hierarchy option , in that option there is year , quarter , month and day but i would like to add here related week number too.

 

Is it possible , could you help me pls 

 

Thanks in advance 

Capture1.JPG

 

 

 

1 ACCEPTED SOLUTION
DataZoe
Microsoft Employee
Microsoft Employee

@erhan_79 You can do this with a Date table. From the Modeling ribbon to go "New Table" and use the following:

 

Delivery Date =
ADDCOLUMNS (
    CALENDAR ( MIN ( Table[Req.dlv.date - Copy] ), MAX ( Table[Req.dlv.date - Copy] ) ),
    "Year", YEAR ( [Date] ),
    "Quarter", QUARTER ( [Date] ),
    "Month", FORMAT ( [Date], "MMM" ),
    "MonthNum", MONTH ( [Date] ),
    "WeekNum", WEEKNUM ( [Date] ),
    "WeekOf", [Date] - WEEKDAY ( [Date], 1 ) + 1
)

 

Then create a relationship between [Date] and [Req.dlv.date - Copy]. You may also want to use the Sort By Column on the [Month] column to be sorted by [MonthNum].

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

5 REPLIES 5
Icey
Community Support
Community Support

Hi @erhan_79 ,

 

I agree to create a custom date hierarchy. Please let us know whether the suggestions above could solve your problem.

 

 

Best Regards,

Icey

FrankAT
Community Champion
Community Champion

Hi @erhan_79 ,

 

  1. It is a good idea to deactivate the checkbox Auto date/time under File > Options ans settings > Options > Current File > Time Intelligence (see figure).
  2. Build your one calendar with desired columns.
  3. Create your one hierarchie from this calender.
  4. Mark this calendar as date table and relate it to your data.

10-08-_2020_16-32-59.png

 

Regards FrankAT

DataZoe
Microsoft Employee
Microsoft Employee

@erhan_79 You can do this with a Date table. From the Modeling ribbon to go "New Table" and use the following:

 

Delivery Date =
ADDCOLUMNS (
    CALENDAR ( MIN ( Table[Req.dlv.date - Copy] ), MAX ( Table[Req.dlv.date - Copy] ) ),
    "Year", YEAR ( [Date] ),
    "Quarter", QUARTER ( [Date] ),
    "Month", FORMAT ( [Date], "MMM" ),
    "MonthNum", MONTH ( [Date] ),
    "WeekNum", WEEKNUM ( [Date] ),
    "WeekOf", [Date] - WEEKDAY ( [Date], 1 ) + 1
)

 

Then create a relationship between [Date] and [Req.dlv.date - Copy]. You may also want to use the Sort By Column on the [Month] column to be sorted by [MonthNum].

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

amitchandak
Super User
Super User

@erhan_79 , Create custom Hierarchy

https://stoneridgesoftware.com/creating-hierarchies-in-power-bi/
https://www.youtube.com/watch?v=x6vXVJZ_eTY

 

Week related -https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@erhan_79 - Should be able to add a WEEKNUM column and add it to the hierarchy. You may have to create MONTH, YEAR, DAY, QUARTER columns as well to build an ad-hoc hierarchy instead of relying on the default date hierarchy.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors