Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kmstephenson
Creator
Creator

dynamic title for chart with cycle groups of calculated dimensions

Hi all,

I use GETCURRENTFIELD() frequently to create dynamic titles on charts with cycle groups. I've run into a problem when I am using a cycle group composed of calculated dimensions.

For example:

CycleGroupA is composed of variables $(eCCSDenomGreaterThan), $(eMDCDenomGreaterThan), $(eDRGDenomGreaterThan), etc.

How can I refer to the current cycle group selected for a dynamic title when I am using calculated dimensions?

6 Replies
sunny_talwar

You can use a if statement to do this:

If(GetCurrentField(CycleGroupA) = 'YourExactExpressionFor_eCCSDenomGreaterThan', 'CallItSomething1', If(GetCurrentField(CycleGroupB) = 'YourExactExpressionFor_eMDCDenomGreaterThan', 'CallItSomething2', and so on....

kmstephenson
Creator
Creator
Author

This does not work and I think it is because the expression for my variable contains quotes - i tried using two quotes around the expression and that didn't work either. Any ideas?


$(eCCSDenomGreaterThan)

if( aggr( count({<ReadmitMeas={'$(vReadmitMeas)'},keep_$(vAfDischTime)_row={1}>}distinct clm_id),IdxHospCCS)  >=  $(vReadmitDenomGreaterThan) ,  IdxHospCCS)

sunny_talwar

May be this:

If(GetCurrentField(CycleGroupA) = 'if( aggr( count({<ReadmitMeas={' & Chr(39) & },keep_$(vAfDischTime)_row={1}>}distinct clm_id),IdxHospCCS)  >=  $(vReadmitDenomGreaterThan) ,  IdxHospCCS)', 'CallitSomething'....


My bad, try this:


If(GetCurrentField(CycleGroupA) = 'if( aggr( count({<ReadmitMeas={' & Chr(39) & '$(vReadmitMeas)' & Chr(39) & '},keep_$(vAfDischTime)_row={1}>}distinct clm_id),IdxHospCCS)  >=  $(vReadmitDenomGreaterThan) ,  IdxHospCCS)', 'CallitSomething'....

kmstephenson
Creator
Creator
Author

Still not working..... I'm guessing it's because the variables within the expression are resolving? How do I prevent that from happening? For example $(vReadmitMeas), $(vAfDischTime), $(vReadmitDenomGreaterThan) are all resolving

sunny_talwar

When you just put GetCurrentField(CycleGroupA), what do you see in a text box? Would you be able to share a sample app? It would be difficult for me to replicate the same issue you are facing.

kmstephenson
Creator
Creator
Author

GETCURRENTFIELD(CycleGroupA) is equivalent to =$(eIdxCCSDenomGreaterThan)