Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
jaymeknapp
New Contributor

Text Color Expression

I'm looking for some help with the following Text Color Expression.  I've tried various editions with my parans, but they must not be correct.

Can anyone assist in looking at my script.

 

=IF
(((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))
/
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])) <= 0.05, LightMagenta(),

IF
(((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))/

Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])) >0.00, LightMagenta()


IF
(((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))/

Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])) <= 0.00, LightRed(), Black()

)
)
)

 

Thanks!

Labels (1)
3 Replies
Highlighted

Re: Text Color Expression


Try this?

=IF((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))
/
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]) <= 0.05, LightMagenta(),

IF((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))/

Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])>0.00, LightMagenta()


IF((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))/

Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]) <= 0.00, LightRed(), Black())))

 

I have manipulated few parenthesis up and down. 


 

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jaymeknapp
New Contributor

Re: Text Color Expression

I tried the solution and do not get any results.

Re: Text Color Expression

We would like to see, What's in your application. If you can share that would help for us to answer. BTW, You can use this?

=IF((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))
/
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]) <= 0.05, 1,

IF((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))/

Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])>0.00, 2,


IF((Sum({$<Year={'2018'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount])
-
Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]))/

Sum({$<Year={'2017'},
[Transaction Line Accounts Account Number]={404100},[Transaction Type]={'Invoice','Cash Sale','Cash Refund','Credit Memo', 'Bill', 'Journal'},
$(vExcludeDateFields)>} [Transaction Line Gross Amount]) <= 0.00, 3, 4)))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)