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
Umlungu
New Member

Setting 12 month display in Timeline by Queryon

Hi 

 

First time query. I am using the Power BI visual called Timeline by Queryon. I want the date to automatically display from 1 July to 30 June. Currently it arranges the display from the first data date to the last data date.

 

what do you suggest I do?

 

Regards

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @Umlungu ,

 

You need to set up a calendar table. There's plenty of tutorials available on how to do this, but you will need to create a column for financial periods (I assume this is why you want Jul-Jun).

 

Once you have your date column for your calendar table in Power Query, you would add a new custom column and put this as the calculation:

if Date.Month([date]) >=7 then Date.Month([date])-6 else Date.Month([date])+6

 

In DAX it would be this:

IF(
    MONTH(calendar[date]) >= 7,
    MONTH(calendar[date]) - 6,
    MONTH(calendar[date]) + 6
)

 

This will give you your financial period number for each month.

Once you add a [monthName] field into your calendar table, in the data view for your calendar you can select [monthName], go to 'Sort by column' on the ribbon and sort by [financialPeriod].

Relate calendar[date] to fact[date] in the model screen, then use calendar[monthName] in any visuals. This will sort the month names July-June.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi Pete

 

Thanks for your answer. Will this provide a solution to my current problem: - when i have only one milestone (say 15 Aug 2021) it will appear in the second measure (month) of 12 measures (months)? Current problem is this single milestone (dated 15 Aug 2021) appears in the middle of the calendar display screen.

 

Regards

 

Umlungu

 

Hi @Umlungu ,

 

I presume you mean that the chart only shows 15th August but no other dates where the measure value is 0?

If so, then all you need to do is add '+ 0' on to the end of the measure that is displayed in the chart. This will force the chart to display all available dates, even if there is no measure value on those dates.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




I will try that out Pete, thanks

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.

Top Solution Authors
Top Kudoed Authors