Forum Discussion
Krlos5411
1 year agoFrequent Visitor
Line graph with two colors based on a paramether value????
Hello experts, Quick question if anyone knows that is possible. I have a line graph with weekly values, those values depends of the data that is updated weekly. And I have a paramether that ...
Krlos5411
1 year agoFrequent Visitor
Thansk for the guide.
I think I got all correct. But I don't have the fx button next to the line color option
kushanNa
1 year agoSuper User
Hi ,
I'm not sure you can achive this using one line , you will need two lines for this one for green and the other for red
steps to get the above result
1. create two mesure for green and red
RedLineMeasure =
VAR Threshold = SELECTEDVALUE(ParameterTable[ParameterValue])
VAR AvgLeadTime = AVERAGEX(
YourData,
DATEDIFF(YourData[LeadTime_Date], YourData[Date], DAY)
)
RETURN
IF(AvgLeadTime <= Threshold, AvgLeadTime, BLANK())
GreenLineMeasure =
VAR Threshold = SELECTEDVALUE(ParameterTable[ParameterValue])
VAR AvgLeadTime = AVERAGEX(
YourData,
DATEDIFF(YourData[LeadTime_Date], YourData[Date], DAY)
)
RETURN
IF(AvgLeadTime >= Threshold, AvgLeadTime, BLANK())
2. add the following values to line chart
3. and color code each lines , i have shown in here green as an example