Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
rowid value arrow
1 1001
2 999
3 504
- 1000
I need to show up and down arrow by comparing the value of blank row id with first row, second row and so on.....
I tried to implement the below calculation but not able to achieve it
if( sum([Value]) <= SUM({$-<rowid = {'?*'}>}[Value]),'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')
I am not entirely sure what you are trying to do, but may be try this:
If(Sum([Value]) <= Sum(TOTAL {$-<rowid = {'?*'}>}[Value]), 'qmem://<bundled>/BuiltIn/arrow_n_g.png', 'qmem://<bundled>/BuiltIn/arrow_s_r.png')
Not sure about the (chart object) context you are trying to use this expression.
Maybe something like this (assuming '-' indicates a NULL in the rowid record)
Create a variable vThreshold like
=Sum({1<value = e({<rowid = {"*"}>}) >} value)
or (if it's in fact a '-' chararacter)
=Sum({1<rowid -= {'-'}>} value)
Do you get the correct value?
Then just use the variable in your expression:
if( sum([Value]) <= vThreshold
,'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')
Create the Variable on front end, vBlankRowId and put below expression
SUM({1-$<rowid = {'*'}>} Value)
then write expression
if( sum([Value]) <= $(vBlankRowId)
,'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')
It's not working, increasing number of rows and adding blank rows.
I think you will might benefit using a technique similar to As-Of Table:
Alternatively, you might need to use Above/Before to achieve what you are looking for:
Hi
You need to create a variable like this
=sum(if(isnull(rowid),value,0))
Now use this in your expression:
if you name the variable as vColor
if( sum([Value]) <= $(vColor),'qmem://<bundled>/BuiltIn/arrow_n_g.png','qmem://<bundled>/BuiltIn/arrow_s_r.png')
This does not compare the blank rowid with other values
Can it be achieved by set, as need to only compare blank row id with the one's having value?
I am not entirely sure what you are trying to do, but may be try this:
If(Sum([Value]) <= Sum(TOTAL {$-<rowid = {'?*'}>}[Value]), 'qmem://<bundled>/BuiltIn/arrow_n_g.png', 'qmem://<bundled>/BuiltIn/arrow_s_r.png')
Thanks, it worked!!!