The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have this chart with a constant line at 4. The chart is using relative date filtering so 2018 months will come into the chart as they occur. I would like to be able to change the constant value in 2018 to 4.5, but have it remain at 4 for 2017. Not sure this is possible, a different way to maybe go about it is using a chart with a line value and maybe use a 4 and 4.5 from a field within the data tables.
Thanks for the help.
Solved! Go to Solution.
Sorry, my bad, wrap your YEAR() in a MAX function. It's a measure, so you need to do some kind of aggregation.
Measure = IF(MAX(YEAR(Table[Date]))<2018,4,4.5)
I would go with a combination line/column chart and use a measure for the line like:
Measure = IF(YEAR(Table[Date])<2018,4,4.5)
The issue with that is my date column has multiple values so it gives me an error. I think I'd need to return a column that returns a 4.5 for the first entry in 2018 and blank in the rest of 2018 values. Similarly return a 4 for the first non 2018 date and the rest blanks. Any ideas?
Hi @jshinnenkamp,
Please follow the solution @Greg_Deckler posted. Please share the sample table and list the expected result if you still have other issues.
Best Regards,
Angelia
Sorry, my bad, wrap your YEAR() in a MAX function. It's a measure, so you need to do some kind of aggregation.
Measure = IF(MAX(YEAR(Table[Date]))<2018,4,4.5)