Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Data Works for AI is here - Join the discussion and enter to win a pair of Qlik kicks: Join the Conversation!
cancel
Showing results for 
Search instead for 
Did you mean: 
Neha121
Contributor III
Contributor III

Text dashboard object

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

Neha121_0-1785452581158.png

 

whereas I want to use it in text object with some workings it doesnt seem to be working

none of the below works

Neha121_1-1785452701766.png

Neha121_3-1785452748998.png

 

 

Labels (3)
4 Replies
Gui_Approbato
Partner - Creator III
Partner - Creator III

='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

Gui_Approbato_0-1785483659163.png

 

Chanty4u
MVP
MVP

Try this 

='Snapshot: ' & Num($(vL.SnapshotPhy), '0.0%')

 

Or

=$(=vL.SnapshotPhy)

BPiotrowski
Partner - Creator
Partner - Creator

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.

marcus_sommer
MVP
MVP

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.