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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table with Quarter

Hello,

Somebody can help me?

This is the problem:

I want to build a table (see table Quarter) in the file attached in which to see last quarter, the previus quarter and the same quarter of the previus year. If none selection are active I want to see last quarter (Gen-Mar 2010), the previus quarter (Ott-Doc 2009) and the same quarter of the previus year (Gen-Mar 2009).

If I select another quarter (ex: IdQuart=19) all is OK, but if I select the corresponding DescrQuart (ex: DescrQuart=2009-3), the value of the previus quarters in the table are 0.

WHY???

HOW CAN I DO???

If I try a set analysis like:

Sum( { 1<IDQuart={"$(=max(IdQuart))"}> } Sales)

I don't can to select another column like DescrType.

THANK ALL

6 Replies
Not applicable
Author

Hi,

you should remove the selections of other fields. So suggest you to write this:

Sum(
{<
IdQuart={"$(=max(IdQuart)-4)"},
DescrQuart,
Year
>}
Sales)

In this case you will remove selections of fields - DescrQuart and Year.

Use this to calculate the previus quarter and the same quarter of the previus year.

Milda

Not applicable
Author

Hi Milda,

Thank for your help.

I don't understand your solution (see table "Quarter - Milda" in the attached file).

If I select the field DescrQuart, I have always the columns with 0. Why?

Thank

Not applicable
Author

Hi Sbuzi,

sorry but I don't understand your question. Because when I select something in DescrQuart, I get the result (numbers) in table "Quarter-Milda" (NOT 0).

Milda

Not applicable
Author

Hi Milda,

thank for your help.

If you see the file attached, there is the sample in which if I select the field DescrQuart, the first two columns of the table "Quarter - Milda" are 0.

Thank All

stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi,

You seem to have missed a step recommended earlier. You need to exclude the selections in the field from impacting your query:

Sum({<IdQuart={"$(=max(IdQuart)-4)"}, DescrQuart=>} Sales)

If you don't include the "DescrQuart=" part in your set then you will get 0 in the chart. Including it with just "=" and no set means "for all values" - i.e. it ignores selections on that field.

Stephen

Not applicable
Author

Thank very much!

I was not careful.

Thank