The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
@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/
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
Hi @erhan_79 ,
Regards FrankAT
@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/
@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.