Forum Discussion

xFrankPBI's avatar
xFrankPBI
New Member
3 years ago

PowerBI Dynamic x-Axis Constant Line on Visuals

I have a Visual showing sales off product based on dates (already dynamic showing 3 months before date off certain product launch, filtered by country on the page)
On the same chart i wannt to add a X-Axis constant line where the line would show the product launch date (information stored in a column) but i can not get the value to show the date.

I also tried the following:

DynamicLaunchDate =
var vMaxDate = TODAY()
var vMinusDate = DATEDIFF(MAX('Launch dates'[RL_Date]), TODAY(), DAY)
var RL_Date = vMaxDate-vMinusDate
Return
RL_Date

Basically returning the original launch date value but when i select this field it shows an error and 0 information
Iv followed youtube videos where exactly the same solutions worked - is data format a problem here or what can it be?

https://www.youtube.com/watch?v=xla7M2Pv6v4 - video I'm referring to (difference being im not using a set - of days, rather a variable that changes based on product launch date)

Edit - the value is correct and showing;
in my visual i have:
1. Total sales off product split by channel
2. a Line showing total sales only (no split)
3. x axis is month

If i remove values 1 or 2 respectivly my x Constant line will show and work properly as i adjust the country filter

Is there system limitations that makes it unable to show both a x axis column, line and an extra line ? as i can allways show 2 at a time - as soon as i add the third i get an error

No RepliesBe the first to reply