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

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 (2)
3 Replies
Anil_Babu_Samineni


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. 


 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jaymeknapp
Contributor III
Contributor III
Author

I tried the solution and do not get any results.

Anil_Babu_Samineni

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)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful