Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
gauthamchilled
Contributor

ignore calculated dimension

Hi,

I have a straight table comparing current year submission amount and another expression previous year submission amount.

I have dimension something like below

Country,

Client,

=Aggr(Only({<Period={"$(=Period)"}>} Submission Date), Submission Date)

problem is after adding the submission date for current year, the previous year submission amount is not populating.

but if i disable calculated dimension highlighted above then the expression is calculating,

how to ignore this calculated dimension or can i use it as expression???

Gautham

Tags (1)
12 Replies
gauthamchilled
Contributor

Re: ignore calculated dimension

Any help?

Re: ignore calculated dimension

if I understood properly your trying to get the submission data for current and previous year on the Date column ....since the date is current year it will not ignore the dimension selection ...if you use any other dimension except the submission date your approach will work.....if you need Submission date as dimension then  you need to make use of  Asof table and get the required flag/column to achieve this ..


The As-Of Table

MVP
MVP

Re: ignore calculated dimension

If Period has more than one possible value, your expression will null out because $(=Period) will evaluate to null. If Period is a dimension, then this approach will not work. If however, you want all the dates within the selected period, then something like

=Aggr(Only({<Period={"$(=Max(Period))"}>} Submission Date), Submission Date)

should work and will return the selected period, or the most recent if nothing is selected.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dinuwanbr
Contributor III

Re: ignore calculated dimension

Hi,

Is it possible for you to upload a sample for better understanding?

BR,

Tharindu

gauthamchilled
Contributor

Re: ignore calculated dimension

Thanks all for the help..i attached an application with dummy data..but the issue is almost similar.

If i add the submission date for current year, i am not getting sales in first column.

please help

gauthamchilled
Contributor

Re: ignore calculated dimension

can anyone please help?

Gautham

Re: ignore calculated dimension

Maybe Like Attached

atkinsow
Valued Contributor II

Re: ignore calculated dimension

Settu's answer looks good.  Otherwise you can make the Submission Date an expression.

If it's an actual date field it would be max(Submission Date)

If it's a string column it would be maxstring(Submission Date)

gauthamchilled
Contributor

Re: ignore calculated dimension

It didnt work in my actual application, still it shows 0.