Forum Discussion
line graph coloring based on
Hi there,
I have three measures that created the lines on a line graph as shown below.
Now I don't want to display the Upper limit and lower limit lines for the months that are gone. For example, I don't want to show the lines for uppper and lower limit from April to October as they are passed now as shown in the picture below:
Is there any way in power BI that we could setup the line color of the graph to transparent white for the months that are gone??
Dunner2020 , Try like
Upper Limit new = if(max(Date[date])> eomonth(today(),0), [Upper Limit], [Actutal value])
Lower Limit new = if(max(Date[date])> eomonth(today(),0), [Lower Limit], [Actutal value])
5 Replies
- amitchandakSuper User
Dunner2020 , Set you upper limit
limit
Upper Limit new = if(max(Date[date])> eomonth(today(),0), [Upper Limit], blank())
lower Limit new = if(max(Date[date])> eomonth(today(),0), [lower Limit], blank())
- Dunner2020Post Prodigy
amitchandak Anonymous , wow it works. Thanks for the reply.
Before I accept the reply as a solution, quick question is it possible to joint the upper and lower limits to the actual value line for the passed months (as shown in the picture)
I tried the following measures to generate similar thing:
Lower Limit new =Var _CYMonth = MONTH(TODAY())Var _RYMonth = if(_CYMonth > 3 && _CYMonth <= 12, _CYMonth - 3,_CYMonth + 9)ReturnIF(max(Dates[RY Month Number])> _RYMonth, [Lower Limit], [Actual Value])Upper Limit new =Var _CYMonth = MONTH(TODAY())Var _RYMonth = if(_CYMonth > 3 && _CYMonth <= 12, _CYMonth - 3,_CYMonth + 9)ReturnIF(max(Dates[RY Month Number])> _RYMonth, [Upper Limit], [Actual Value])It produced the following output
As you can see that the color of actual value is changed and to brown. Is there any way of doing that?
- amitchandakSuper User
Dunner2020 , Try like
Upper Limit new = if(max(Date[date])> eomonth(today(),0), [Upper Limit], [Actutal value])
Lower Limit new = if(max(Date[date])> eomonth(today(),0), [Lower Limit], [Actutal value])
- AnonymousNot applicable
You can write new measures for upper limit and lower limit and set them to zero for all the months prior to current month and then plot them on line graphs.