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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RUION
Frequent Visitor

Date Hierarchy is not displated for Date type data

I have a column that holds either dates or empty cells (null).  I have set the data type to Date, but the Hierarchy is missing under Vizualizations.  For other columns which are set with Date type, I have the hierarchy available.  

Can you advise me how to get the hierarchy view? 

1 ACCEPTED SOLUTION

I can think of three options.

 

1) Link the date column to a date table with contiguous dates and no blanks and use that

2) In Power Query replace all blank dates with 0 and then filter out the zero's (1/1/1900) if you need to.

3) Build Measures for your own Heiarchy

       YEAR = FORMAT(AVERAGE(table[Date]),"YYYY")

       QUARTER = VAR Q = FORMAT(AVERAGE(table[Date]),"Q" RETURN SWITCH(Q, "1", "Qtr 1","2", "Qtr 2","3", "Qtr 3","4","Qtr 4")

       MONTH = FORMAT(AVERAGE(table[Date]),"MMM")

       DAY = FORMAT(AVERAGE(table[Date]),"dd")

       then make a heirachy by dragging them under the Date in teh right pane

 

 

View solution in original post

3 REPLIES 3
Seward12533
Solution Sage
Solution Sage

Do the other date columns also contain blanks? Not sure if that’s the issue and I can’t test right now. Worst case you can build it yourself from your date table or with A few new measures using FORMAT

The other columns that have a hierarchy do NOT contain any blank cells. I am a newby and don't really understand what you propose me to do... can you be more detailed please?

I can think of three options.

 

1) Link the date column to a date table with contiguous dates and no blanks and use that

2) In Power Query replace all blank dates with 0 and then filter out the zero's (1/1/1900) if you need to.

3) Build Measures for your own Heiarchy

       YEAR = FORMAT(AVERAGE(table[Date]),"YYYY")

       QUARTER = VAR Q = FORMAT(AVERAGE(table[Date]),"Q" RETURN SWITCH(Q, "1", "Qtr 1","2", "Qtr 2","3", "Qtr 3","4","Qtr 4")

       MONTH = FORMAT(AVERAGE(table[Date]),"MMM")

       DAY = FORMAT(AVERAGE(table[Date]),"dd")

       then make a heirachy by dragging them under the Date in teh right pane

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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