Discussion Board for collaboration related to QlikView App Development.
Hi,
I have a calculated dimension like the following
aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))
I want to print negative value in Red. so in text color I put the below code
if( aggr(sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB)))<0,RGB(255,0,0),black()
As a result I am getting some negative value as red and some negative value are not in red. This is very strange .
Even if I put NUM function before the aggr the result is same.
Any help much appreciated.
Perhaps this?
if(Sum(Aggr(Sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))<0,RGB(255,0,0),Black())
Thank you Anil for your reply, I tried with Sum as you said , however getting same result.
For some negative value I am getting it red and for some negative value I am getting black.
Hi,
use actual expression instead of variable. i too faced similar issue while applied text color in a dimension field value.
or share your variable expression, mock data, i can help you
Thanks,
Deva
Thank you Devarasu, my vVariable is the date that is coming from a selection. If I do not use variable to pass date in the expression , how would I do alternately.
Hi,
Can you share your mock app.
also u can try like below,
if ( aggr(sum({<xxx=,Date={"$(=max(Date))"}>}YYYY),AAA,BBB)) <0 ,RGB(255,0,0),Black())
Even if I remove the variable from the expression , the result is same.
Can you try this first
If(Sum({<xxx=,Date={"$(vVariable)"}>}YYYY) <0, 1,0)
And then check with below
if(Sum(Aggr(Sum({<xxx=,Date={"$(vVariable)"}>}YYYY),AAA,BBB))<0,1,0)
Can you show the image after this with Value in text box?
Hi,
Can you prepare mock data set and expected output in excel form. it's easy for us to check and help u. tks
Hi Anil,
Both the expression in text box is giving me value 1 .
For some restriction I am not able to paste the image.