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

Questions about new x-axis constant line

Love the new x-axis constant line but can't figure this out.  Maybe it is not possible?

 

First question: can you have a constant line show every x period e.g 01 July of every year, or 01 of each month?

 

Second question: is it possible to use a dax measure instead of manually inputting the constant line, e.g set it to always be first day of previous month?  That way it automatically stays relevant without having to manually change it every month.

1 ACCEPTED SOLUTION
DataZoe
Employee
Employee

Hi @dapperscavenger , It is a very cool feature but I don't think it can do measures just yet! You can get the same functionality by changing a line chart to a combo chart, then adding this measure to the columns (keeping the others on the lines):

First Day Last Month =
var month = month(TODAY())-1
var year = if(month = 0, year(today())-1,year(today()))
var month2 = if(month=0,12,month)
var lastmonthdate = date(year,month,1)
return
if(SELECTEDVALUE('Date'[Date]) = lastmonthdate, 1, blank())
 
DataZoe_0-1617413776334.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

1 REPLY 1
DataZoe
Employee
Employee

Hi @dapperscavenger , It is a very cool feature but I don't think it can do measures just yet! You can get the same functionality by changing a line chart to a combo chart, then adding this measure to the columns (keeping the others on the lines):

First Day Last Month =
var month = month(TODAY())-1
var year = if(month = 0, year(today())-1,year(today()))
var month2 = if(month=0,12,month)
var lastmonthdate = date(year,month,1)
return
if(SELECTEDVALUE('Date'[Date]) = lastmonthdate, 1, blank())
 
DataZoe_0-1617413776334.png

 

Respectfully,
Zoe Douglas (DataZoe)



Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/

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.