The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone,
i have a graph in which i want to insert a conrol line. in the dashboard there is a slicer to choose a range of dates and because of this i need that the control line will be dynamic.
for example if i choose a range of 2 days then the control line will be 6, and if i choose a range of 5 days then it will be 15 (3 for every day).
so i succeed to create a measure that will count the number of days chosen, the problem is that for creating a control line i need to put the values in each record in the table but when i insert the measure in the column the output is always 1 although the measeure in a card is different.
I tried to create a control line using only a measure but coudnt succeed.
Thank you in advance.
Solved! Go to Solution.
@noamshn Review the attached screenshot based on Date Range selected Control Line would be updated.
Days Difference = DATEDIFF(MIN('Table'[Date]),MAX('Table'[Date]),DAY)
Control Line = [Days Difference]*3
Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
@noamshn Review the attached screenshot based on Date Range selected Control Line would be updated.
Days Difference = DATEDIFF(MIN('Table'[Date]),MAX('Table'[Date]),DAY)
Control Line = [Days Difference]*3
Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
did you use line and clustered column chart? because in the card visual i see the value correct but in the chart the value is 0.
@noamshn I'm using Clustered Column chart and use control line as a constant line. You can add constant line by using Analytics Pane. Please review the attached screenshot.
Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Hi @noamshn
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly