Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
Contributor III

## Combination of identifires

Hi there.

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
MVP

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)

19 Replies
Employee

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).

MVP

Try changing 1 with \$

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

Contributor III
Author

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

That's the issue.

Contributor III
Author

Sunny,

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

MVP

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)

Employee

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"

Contributor III
Author

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

MVP

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

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?

Community Browser