Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have defined a variable in qliksense how do I use this variable in text dashboard object.
Var definition
vL.SnapshotPhy
if('$(vL.FY_Occurred)' = '$(vL.FY1_Occurred)' and [Snapshot Qtr_FY1]='$(vMax_QTR)',if([PQtrs_FY1]='Physical',num([pivot % PQtrs_FY1])),
if('$(vL.FY_Occurred)' = '$(vL.FY2_Occurred)' and [Snapshot Qtr_FY2]='$(vMax_QTR)',if([PQtrs_FY2]='Physical',num([pivot % PQtrs_FY2]))
))
when I use this table it works
whereas I want to use it in text object with some workings it doesnt seem to be working
none of the below works
='The value $(vL.SnapshotPhy) is...' should work - you don't need to put it out of the expression.
Check if you are solving it in the variable:
it makes a difference to add the equals sign (=) when you define a variable, so try changing that in yours too.
See the variable below - when you add the variable in your object the expression is already solved
Try this
='Snapshot: ' & Num($(vL.SnapshotPhy), '0.0%')
Or
=$(=vL.SnapshotPhy)
Hi,
I assume you used [PQtrs_FY1] as dimention in table and thats why you have only one cell filled for Physical.
If you want to get this measure working in text object you should apply if as set analysis:
if('$(vL.FY_Occurred)' = '$(vL.FY1_Occurred)',
{<[Snapshot Qtr_FY1]={'$(vMax_QTR)'}, [PQtrs_FY1]={'Physical'}>} num([pivot % PQtrs_FY1])
if('$(vL.FY_Occurred)' = '$(vL.FY2_Occurred)',
{<[Snapshot Qtr_FY2]={'$(vMax_QTR)'}, [PQtrs_FY2]={'Physical'}>} num([pivot % PQtrs_FY2])
For me you need measure like this, and the issue was if with search in dimention where text object does not use dimentions.
A field-call must be always wrapped with an aggregation-function or the combination of the existing selections and the dimensional context must ensure that each output has only unique values - otherwise the result is NULL.
Your table seems to provide this dimensionality while the result for your text-box isn't unique. Measurements to get it to work could be to add more filters (like already hinted it would be better as set analysis), to use aggregation-functions, like sum() or avg() and/or wrapping some parts of your calculation within an aggr() and to define there the needed dimensional context.