Forum Discussion

dmartiprev's avatar
dmartiprev
Frequent Visitor
3 years ago

KPI Color

I have made this before but now it doesn't seem to work correctly.  I made a KPI tile of daily crude oil prices that i want to be green if the daily price change is positive and red if the daily price change is negative.  I have three columns of data in Table1: Date, Daily Price of Oil, and Oil Daily Price Change which is how much the price of oil has gone up or down since the previous day. 

 

I have also created a measure called: Last Oil Price Change = LASTNONBLANKVALUE('Table1'[Date],SUM('Table1'[Oil Daily Price Change])).   

 

I set the Values of the KPI tile to be the column of data for the Daily Price of Oil and the target for the KPI to be this measure.  Therefore, in the trend axis I set a rule for coloring if the measure Last Oil Price Change is >0 then green and if <0 then red.  However, this doens't seem to work.  any ideas what I'm doing wrong?

5 Replies

    • dmartiprev's avatar
      dmartiprev
      Frequent Visitor

      Hi Anonymous ,

       

      Really all I want to do is have a KPI that shows the "Daily Price of Oil" and will be red or green if the last "Oil Daily Price Change" was down or up from the previous day's price.  How do i do that?  I have three columns of data: "Date", "Daily Price of Oil", and "Oil Daily Price Change"

      • dmartiprev's avatar
        dmartiprev
        Frequent Visitor

        Here is a visual of the KPI,  the color should be red since the daily change is negative.