Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnnyV
Contributor
Contributor

Converting values to text when using aggr function

Hi - 

I have this expression and I am trying to implement the conditions in my comment section where by I am essentially converting a value to text - is alt the right function here in this case - need some direction on how to implement when multiple values will need to get converted to text?

If(RowNo() = 0, Avg(Aggr(Avg({<CagrEPS2Y={">-.6 <.6"}, // If field result is out of this range then convert value to "NM"
EpsYearplus3={">0"},                                                                     // If this field is negative or Null then convert result to "NA"
EpsNY={">0"}>},                                                                              //If this field is negative or Null then convert result to "NA"
CagrEPS2Y),OwnerName)),
Avg({<CagrEPS2Y={">-.6 <.6"},EpsYearplus3={">=0"}, EpsNY={">=0"}>}CagrEPS2Y))

2 Replies
sunny_talwar

Not entirely sure I follow... would you be able to elaborate on this using an example?

JohnnyV
Contributor
Contributor
Author

Thanks - wanted to simply - here's my expression if the value output is greater than the absolute value of 60 for that row then display text instead; so if this aggregated average yields a value of 250% show as NM 

If(RowNo() = 0, Avg(Aggr(Avg({<CagrEPS2Y={">-.6 <.6"},  // If field result is out of this range then convert value to "NM"

CagrEPS2Y),OwnerName)), Avg({<CagrEPS2Y={">-.6 <.6"}>}CagrEPS2Y))