Last answered:

31 May 2021

Posted on:

30 May 2021

0

How to get day same as DueDate

In DueDate, Day is the actual day within the month (eg. 23 if due date is January 23), while in CustomHierarchy, Day is Monday to Sunday. How do we get the same definition of Day as in DueDate?

3 answers ( 0 marked as helpful)
Instructor
Posted on:

30 May 2021

0

Can you please provide a screenshot? Hierarchies do not contain the full date in each node of the hierarchy. For example we build a date hierarchy which starts with Year the highest level - meaning that the Year is one node of the hierarchy, month is another and day is also a node of the hierarchy. Hierarchies are meant to contain each part of the date isolated so you can drop down from the year only level to the month only level to the day only level. I hope this makes sense.

Dimitar

Posted on:

30 May 2021

0

Hello,
What's the formula to get the Day (ie. 1 to 30/31 of the month) component of the date so it's possible to drill down like below for custom hierarchies? The formula that was given was for Day of the week (Monday to Sunday). Thanks for the assistance.

image.png

Instructor
Posted on:

31 May 2021

0

Hi Kristel, to get the day number, please use the DAY(fact_InternetSales[DueDate]), this will give you the number of the day, Please note that this should only be used as part of a calculated column, otherwise you are likely to get an incorrect result

Submit an answer