Reply
Member
Posts: 94
Registered: ‎09-13-2016
Accepted Solution

Date Hierarchy issues

[ Edited ]

Hello,

I'm working on a big report including dates from 2016 and 2017,

for some reason the date hirrarchy mixes dates from Q1 2016 and 2017.

I would like to present 5 Quarters, Q1 2016 Q2 2016 Q3 2016 Q4 2016 Q1 2017 -  the data is dynamic so the solution should be permanent.

 

Capture.PNG

BR,
Noa.

Accepted Solutions
Member
Posts: 94
Registered: ‎09-13-2016

Re: Date Hierarchy issues

Hi,

here's a quickest  solution - calculated column

Year-Quarter = CONCATENATE( [createdon].[Year]," " & [createdon].[Quarter])

 

thank you for your help.

BR,
Noa.

View solution in original post


All Replies
New Contributor
Posts: 670
Registered: ‎07-28-2016

Re: Date Hierarchy issues

A hierarchy is for drill down, so in your case, you would have columns that aggregate for year, and when you drill down it show Q1-4 of that year.  In order to show all the quarters by year, you could expand the hierarchy (forked arrow at top right of visual).  However, if your "createdon" field spans more than the time you wish to show in your chart (Q1 2016 through Q1 2017), I recommend creating your own date table.  Then, create your date fields (i.e. "Year", "Month", "Qtr" etc) and include a Quarter Year key (concatenate the quarter and year) as well as a Quarter Year sort field ("Year" * 10 + "Quarter").  This will allow you to create your own hierarchy but filter the visual to only show the quarters you want.  The sort field allows you to sort the axis so that it isn't sorted alphabetically.

New Contributor
Posts: 670
Registered: ‎07-28-2016

Re: Date Hierarchy issues

Forgot to mention that you can make this dynamic by having your date table reference the earliest and latest dates in your "CreatedOn" field so that the date table always gives you the necessary range.  If you need the range to extend further, than you can either hard code it or use the latest date and add to it, depending on your use case.

 

As for the date hierarchy mixing dates, please provide some additional info so we can discover what is going on.

Member
Posts: 94
Registered: ‎09-13-2016

Re: Date Hierarchy issues

Hi,

here's a quickest  solution - calculated column

Year-Quarter = CONCATENATE( [createdon].[Year]," " & [createdon].[Quarter])

 

thank you for your help.

BR,
Noa.