Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

jonathanruiz
New Contributor III

Set analysis and variables

I have a problem, I have a table with a legal size of year and quarter, I need to count the values ​​for the corresponding period

1.png   2.png

I have two variables

var1.png var 2.png

The problem is when I put the variable x in the set analysis, this does not give me any results, next place the formula with a value written to validate that if the data exists, please help me, thanks



tabla.png

10 Replies
vasiliy_beshent
Contributor III

Re: Set analysis and variables

Hi, maybe that helps:

4.5.3 Using a variable storing integer members

With integer keys, you need to enclose the variable name between double quotes:

{<TIME_KEY = {"<$(vFirstPeriod)"}>}

Or {<TIME_KEY = {"<$(=vFirstPeriod)"}>}

The periods between two dates:

{<TIME_KEY = {">$(vFirstPeriod) <$(=vLastPeriod)"} >}

Re: Set analysis and variables

May be try by adding an equal sign within your dollar sign expansion and use Single or Double quotes

Count({<Periodo = {"$(=vPeriodoSet)"}>} @Id_Recurso)

jonathanruiz
New Contributor III

Re: Set analysis and variables

Try double quotes but still not working, thanks

jonathanruiz
New Contributor III

Re: Set analysis and variables

Try double quotes and the equal sign but still not working, thanks

Re: Set analysis and variables

My bad, try with vMaxPeriodo

Count({<Periodo = {"$(=vMaxPeriodo)"}>} @Id_Recurso)

jonathanruiz
New Contributor III

Re: Set analysis and variables

Thanks Sunny but still not working,


vMax.png


If I put the variable with double quotes and the equal sign, this does not throw me nigun value


vmaxperiodo.png

Re: Set analysis and variables

Would you be able to share your qvf to take a look at this?

jonathanruiz
New Contributor III

Re: Set analysis and variables

Sure, what I want is to count the resources dynamically according to the dimension, if it is only the year of the last month of the year, if it is only quarter of the last month of the quarter and if it is monthly for each month, thank you very much

vasiliy_beshent
Contributor III

Re: Set analysis and variables

Like that?

2017-05-31 17_23_41-Clipboard.png

Community Browser