Forum Discussion

SS_1122's avatar
SS_1122
Frequent Visitor
3 years ago
Solved

Colour text according to condition

Hi All, I am having a bit of trouble to get this right. I have a data set with dates and 2 columns Submitted and Delivered, if values for both the columns are 1, then file has been "successfully t...
  • v-yueyunzh-msft's avatar
    v-yueyunzh-msft
    3 years ago

    Hi, SS_1122 

    Thank you for your quick response, based on your description you want to show the green and red color according to the return in your card visual. Right?

    Here are the steps you can refer to:

    (1)This is my test data:

     

     

    (2)We can create a measure to return the [Successful] of the last date. And we can put the measure on the card visual.

    Last Successful = var _date = MAX('Table'[Date])
    
    var _t = FILTER('Table','Table'[Date] =_date)
    
    return
    
    MAXX(_t,[Successful])

     

    (3)We need to create a measure to configure the text color in the card visual.

    Color Flag = IF([Last Successful] = "File Submission is successful","green","red")

     

    (4)Then we can configure it in the card visual:

     

     

    Then we can meet your need , the result is as follows:

     

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly