10 Replies Latest reply: May 31, 2017 10:58 AM by Jonathan Ruiz

# 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

I have two variables

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

• ###### 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

Try double quotes but still not working, thanks

• ###### 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)

• ###### Re: Set analysis and variables

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

• ###### Re: Set analysis and variables

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

• ###### Re: Set analysis and variables

Thanks Sunny but still not working,

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

• ###### Re: Set analysis and variables

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

• ###### 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

• ###### Re: Set analysis and variables

Like that?

• ###### Re: Set analysis and variables

It works but it is telling me all year or quarter, instead of one in particular, thank you very much for your help Vasily