Forum Discussion
Dates
Hi all
Just a question around dates.
I've completed a few reports where I've added a date table in to create a relationship with the data itself.
Once I add my Many to One or One to One relationahips in, I often lose date heirachy functionality on one side of the realtionship?
Is there any way I can do this a different way to ensure I retain heirachy functionality on both sides of my relationship?
In this example its a One to One relationship, as you can see I have retained Heirachy function the Collection Date, but lost it on the Date column.
Any advice?
Thanks!
Anonymous , When you create a date table and mark it date column it will ask for date that will become Key. So you will not have a hierarchy.
You can create a custom hierarchy or have another date column that can have hierarchy
Date 1 = [Date]
Hi Anonymous
you have to keep two differences in mind:
-
The first icon is used for a table that is set as calendar table. In the calendar table, you can create any own hierarchies. In model view, simply drag the month column over the year column, and so on.
-
The second icon marks a column that contains dates and is internally managed by Power BI Desktop and provided with a date hierarchy. This operation can be influenced in the options settings. You have no influence on these hierarchies!
Take a look at tab File > Option and settings > Option > Load Data (Global) > Time intelligence > Auto date/time for new file.
Take a look at tab File > Option and settings > Option > Load Data (Current File) > Time intelligence > Auto date/time.
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)-
13 Replies
- amitchandakSuper User
Anonymous , When you create a date table and mark it date column it will ask for date that will become Key. So you will not have a hierarchy.
You can create a custom hierarchy or have another date column that can have hierarchy
Date 1 = [Date]
- AnonymousNot applicable
Hi amitchandak
Thanks for your response.
I had tried adding a further date, but I have just tried again but it does not give me the heirachy?
Here is the column I added:
Here is the resulting column type:
And as you can see, no heirachy available:
Am i missing something obvious?
Thanks
- AnonymousNot applicable
Any further views on this issue?
- avik_bcRegular Visitor
Hi,
Can somebody please show me how to create a range of dates from a Date table? I have weekly date table from 2014 till date. I need to create a date table containing dates from January 1, 2014 to December 31, 2014. Creating a separate calendar for that period is not helping. Anybody?
- FrankATCommunity Champion
Hi Anonymous
you have to keep two differences in mind:
-
The first icon is used for a table that is set as calendar table. In the calendar table, you can create any own hierarchies. In model view, simply drag the month column over the year column, and so on.
-
The second icon marks a column that contains dates and is internally managed by Power BI Desktop and provided with a date hierarchy. This operation can be influenced in the options settings. You have no influence on these hierarchies!
Take a look at tab File > Option and settings > Option > Load Data (Global) > Time intelligence > Auto date/time for new file.
Take a look at tab File > Option and settings > Option > Load Data (Current File) > Time intelligence > Auto date/time.
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)- AnonymousNot applicable
Hi FrankAT
Thanks for your reply. I suspect I did not make myself clear in my original question.
I have resolved the heirachy issue, so thank you for your's and amitchandak assistance.
Kind Regards
- amitchandakSuper User
Anonymous , In case non of the above solutions, worked. Post your solution and mark that as the solution. So others can get benefited. If something above worked, mark that as a solution.
-
- SanmelmerRegular Visitor
Hi!
Im trying to have a graphic by week.
The dates are between these weeks: 27 /2020 and 2/2021
The problem is that the graphic doesnt understand w1 and w2 of 2021 should go later w53 2020. And they appear before w27/2020.
When i put the dates by day instead of weeks, it works ok! but not with the weeks 😞
I created a table with the dates:
WEEKNUM('RANGO FECHAS'[Date],2)Please could you help me??thanks!!- AnonymousNot applicable
Could you not add a new column to your date table, which specifies the unit of time that you are looking for?
Maybe by using a SWITCH statement you could say for example:Date (UK format) Desired format
1/1/2021 W53
Not a perfect solution and I'm sure cleverer people than me will have more insight, but that could get the job done.
- SanmelmerRegular Visitor
Hi ! and thanks for your reploy
I already have these columns , the problem is with the graphic ==>