Forum Discussion

Abdulazizsagga's avatar
Abdulazizsagga
Regular Visitor
4 years ago
Solved

mesaure dynamic text (Active or Expired)  based on date Colum (Contract End Date)

Hello

I have card visual and i need to create mesaure dynamic text (Active or Expired)  based on date Colum (Contract End Date)

for example :

 the end date of contract A is  11/05/2021 the result should be in card visual = expired 

 the end date of Contract B   is 11/05/2022  the result should be in card visual = Active  

 

 

 

 

Thanks 

  • Greg_Deckler's avatar
    Greg_Deckler
    4 years ago

    Abdulazizsagga Try:

    Column = IF(TODAY()>[End Date],"Active","Expired")
    
    Measure = IF(TODAY()>MAX('Table'[End Date],"Active","Expired")
  • Hi Abdulazizsagga 

    If you want the card visual to show blank until you select one contract, you can try this,

    Measure = IF(ISBLANK(SELECTEDVALUE('Table'[contract])),BLANK(),IF(SELECTEDVALUE('Table'[End Date])<TODAY(),"Expired","Active"))

     

     

    Best Regards,

    Community Support Team _Tang

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

3 Replies

  • v-xiaotang's avatar
    v-xiaotang
    Icon for Community Support rankCommunity Support

    Hi Abdulazizsagga 

    If you want the card visual to show blank until you select one contract, you can try this,

    Measure = IF(ISBLANK(SELECTEDVALUE('Table'[contract])),BLANK(),IF(SELECTEDVALUE('Table'[End Date])<TODAY(),"Expired","Active"))

     

     

    Best Regards,

    Community Support Team _Tang

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

    • Greg_Deckler's avatar
      Greg_Deckler
      Icon for Community Champion rankCommunity Champion

      Abdulazizsagga Try:

      Column = IF(TODAY()>[End Date],"Active","Expired")
      
      Measure = IF(TODAY()>MAX('Table'[End Date],"Active","Expired")