Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a line chart where:
DVPG is a Date dimension, and this is the expression:
=avg({1 <STCK={'CVCB3'}, DVPG={">$(=Date(Addmonths(Today(), -3)))"}>} VDAF)
Now, I would like to color the entire chart based on the comparison between the last two available value of VDAF for STCK='CVCB3'... how can I do it?
I would like to do something like this:
=If(firstsortedvalue(VDAF, -DVPG, 1) > firstsortedvalue(VDAF, -DVPG, 2), color(2), color(3))
But his expression must consider only the STCK=CVCB3
How can I do it?
You can include similar set analysis in firstsortedvalue(), like:
=If(firstsortedvalue( {<STCK={'CVCB3'}>} VDAF, -DVPG, 1) > firstsortedvalue({<STCK={'CVCB3'}>} VDAF, -DVPG, 2), color(2), color(3))
You can include similar set analysis in firstsortedvalue(), like:
=If(firstsortedvalue( {<STCK={'CVCB3'}>} VDAF, -DVPG, 1) > firstsortedvalue({<STCK={'CVCB3'}>} VDAF, -DVPG, 2), color(2), color(3))