-
Re: if Condition & Set Analysis
Krishna Nagulapally Feb 28, 2018 5:43 PM (in response to Hari Nag)could you please post sample qvw?
In your case, I would rather have 3 expressions on one chart and hide expressions based on your conditions.
So first expression is only visible if Filter=Active. This was you will see expression field based on your conditions and performance should be good.
Other ways are to look into script and make adjustments you you are able to use SET ANALYSIS instead of IF conditions. Expressions with IF conditions will always be slow. Avoid as much as you can.
Hope this helps.
-
Re: if Condition & Set Analysis
Digvijay Singh Feb 28, 2018 6:32 PM (in response to Hari Nag)High chances of the situation that in your data model some of the dimensions are not associated as needed and causing cross join but cannot be 100% sure without seeing data model and the chart dimensions/measures.
I think he is trying in QS where we don't have measure hiding based on condition. I have been looking for this feature in QS since long.
-
Re: if Condition & Set Analysis
Krishna Nagulapally Feb 28, 2018 7:29 PM (in response to Hari Nag)Or you may want to try
=if( GetSelectedCount(status)=0 or status = 'Active',
Sum({$<status={'Active'}, [Country Type] ={'Onsite'}>}Amount) ,
if( status = 'Passive',
Sum({$<status={'Passive'}, [Country Type] ={'Onsite'}>}Amount*5),
Sum({$<status={'Passive'}, [Country Type] ={'offshore'}>}Amount*8)
)
)
try not using getfieldselection() function. Pick(Match()) is also preferred over If() in most cases.Try Using that too.
In QS unfortunately this feature of hiding the measure isnt available yet, there are few extensions available.try using them instead.
Post the qvf that you have problem with, in a table,the engine calculates for each and every row/column but not in a KPI where you have a single value aggregated over a set of data,so obviously there would be a latency,so we have to recheck the conditions.
-
Re: if Condition & Set Analysis
Pablo Labbe Feb 28, 2018 7:48 PM (in response to Hari Nag)When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others