cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dapperscavenger
Helper IV
Helper IV

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
Super User II
Super User II

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,
DataZoe


See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

1 REPLY 1
DataZoe
Super User II
Super User II

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,
DataZoe


See my reports and blog at https://www.datazoepowerbi.com/

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors