Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
aisolomatin
Contributor III
Contributor III

Combination of identifires

Hi there.

Please help me with expression:

I got some dimentions in my data: quantity, report_date, expirience, location,subdivision and etc.

I need expression for Sum of quantity with conditions:

1. I need sum for previous date (I got variable v_PD for this);

2. no reaction for selecting in dimension "Expirience";

3. Other dimensions are active for select.

I got expression, but it does not respond to other dimensions:

Sum({1<expirience,report_date={"$(v_PD)"}>}quantity)

1 Solution

Accepted Solutions
sunny_talwar

720? how are you getting this number? You mean 336 may be?

Try this:

=Sum({$<Expirience,Report_date_month={"$(=Month(v_PD))"}, Report_date_month_quoter>}Quantity)

View solution in original post

19 Replies
Miguel_Angel_Baeyens

Close, but should be more like

Sum({1< expirience =, report_date = {"$(=Date(v_PD))"} >} quantity)

Most likely, the issue is that "v_PD" and "report_date" are not using the same exact value, therefore the use of the Date() function to make sure it does. Still there could be issues if the date format is not exactly the same in the variable than in the field (for example, the field contains hours and minutes but the variable only contains day, month and year: they look the same on the text object, the values are different).

sunny_talwar

Try changing 1 with $

Sum({$<expirience,report_date={"$(v_PD)"}>}quantity)

aisolomatin
Contributor III
Contributor III
Author

Miguel, thanks for your answer.

Your expression works, but it doesn't respond for other dimensions in my listboxes (location,subdivision and etc).

That's the issue.

aisolomatin
Contributor III
Contributor III
Author

Sunny,

nope. In that case my condition for date (I need previous date) doesn't work.

sunny_talwar

If mbaeyens‌'s expression is working, then may be you just need to replace 1 with $ in his expression:

Sum({$< expirience =, report_date = {"$(=Date(v_PD))"} >} quantity)

Miguel_Angel_Baeyens

Likely because as Sunny points out, the "1" set identifier means the whole model, regardless of selections.

Just remove that 1, or use the dollar sign instead (no need to specify it for the calculation to be right) so instead of using all values all the time, it uses the values selected. That's why you use the "expirience = ," part in the set analysis, to explicitly ignore any selection done in the field "expirience"

aisolomatin
Contributor III
Contributor III
Author

If i remove "1", then my variable for previous date became 0.

sunny_talwar

Do you have another date related field where you are making selection in your dashboard?

aisolomatin
Contributor III
Contributor III
Author

In ny data i got field "Date_report", from this field i make "Month","Year","Quater" fields.

Maybe it's better if i make simple layout?