1

PQL Dynamic text formatting

Hi, 

I'm trying to write a PQL for dynamic text, so that when the data value selected in my matrix is equal to or greater than 0 it's formatted as Green.  

I've written the below but it's not working, how would i write this PQL correctly?

 Thanks

2 replies

null
    • imbarmarinescubar_pyram
    • 7 mths ago
    • Reported - view

    Hi  ,

    Try this one:
     

    if(data(0,1) >= 0, fontformat(formatteddata(0,1), "Green"),  fontformat(formatteddata(0,1), "Red"))
    
    

    I'm not sure why that first format was there. Also the formattedData function will return the value as displayed in the grid instead of the raw value which might not be nicely formatted.

    • Katie_Easton
    • 6 mths ago
    • Reported - view

    Thank you, that worked!

Content aside

  • Status Answered
  • 1 Likes
  • 6 mths agoLast active
  • 2Replies
  • 44Views
  • 2 Following