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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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.

 

featleyd_0-1600688194111.png

featleyd_1-1600688219563.png

 

Any advice?

 

Thanks!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super 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]

 

 

View solution in original post

FrankAT
Community Champion
Community Champion

Hi @Anonymous 

you have to keep two differences in mind:

 

  1. 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.

  2. 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)

 

View solution in original post

13 REPLIES 13
Sanmelmer
Regular 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!!
Anonymous
Not 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.

Hi ! and thanks for your reploy 

I already have these columns , the problem is with the graphic ==> 

 

semanas.png

InkedCaptura de pantalla _LI.jpg

Anonymous
Not applicable

My guess would be that the format you have isn't a recognised date format, and that Power BI is interpreting it as a number?

Hello!

no, it is a date and its recognized.  

The problem is that I want to make a graphic with the WEEKS in the X axis. 

I have weeks from 2020 and 2021. The weeks 1, 2... from 2021 should go after w53 of 2020. But Power bi doesnt recognize that should go like that and put w 1,2... before in a logical order. 

(If i put the days (not weeks) it is ok! but i need the weeks in the graphic) 

Anonymous
Not applicable

FrankAT
Community Champion
Community Champion

Hi @Anonymous 

you have to keep two differences in mind:

 

  1. 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.

  2. 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)

 

Anonymous
Not 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

 

 

@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. 

amitchandak
Super User
Super 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]

 

 

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?

 

Anonymous
Not 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:

featleyd_0-1600689275393.png

Here is the resulting column type:

featleyd_1-1600689302645.png

And as you can see, no heirachy available:

featleyd_2-1600689328439.png

 

Am i missing something obvious?

 

Thanks

 

Anonymous
Not applicable

Any further views on this issue?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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