Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension as value in a set analysis expression

Hello,

I've got the problem, that users would like to have values of dimensions in a set analysis expression, so that they can get a table like this:

error loading image

Is there an opportunity to have an expression like this for the column "Sales NewCustomer":

Sum ({$<SalesDate={'>=NewCustomerFrom <=NewCustomerTill'} >} Sales)

Thanks!

Peggy

28 Replies
nathanfurby
Specialist
Specialist

This syntax should work:

sum({<Date={">=$(From) <=$(To)"}>} Value)

Of course there may be format issues - hard to test without the sample data.

rbecher
MVP
MVP

I think this should be quoted:

=Sum( {$<SalesDate={">='$(NewCustomerFrom)' <='$(NewCustomerTill)' "}>} Sales)


- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Chris,

thank you for your answers.

If I use your formular QlikView interprets it like this

I think its good to have an example QVW-file for this tricky problem, but I can't load it.

Regards

Peggy

Not applicable
Author

Thanks Ralf,

good idea, but in my example qvw it doesn't work...

Regards

Peggy

Not applicable
Author

May be it doesn't work with QV 9 Version?

chris_johnson
Creator III
Creator III

Hi,

Yes, I have found it will evaluate to blank values for the dates in the heading. I guess because there are multiple rows with different values in for the from and to dates it will not be able to show you. This is just the heading though, as long as you get the correct values it should be ok.

What do the values in your rows look like?

Regards,

Chris

Not applicable
Author

Hi Chris,

I have posted the example...

Can you have a look at it?

Thanks

rbecher
MVP
MVP

This works on Version 10:

=Sum( if(SalesDate>=NewCustomerFrom AND SalesDate<=NewCustomerTill, Sales))


- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hallo Ralf,

danke! Das ist es!

Mal sehen ob ich das in meine komplexe Formel einbauen kann!

Viele Grüße

Peggy

chris_johnson
Creator III
Creator III

Hi,

I was actully just about to suggest that (honest), you're too quick for me Ralf!

Glad it got sorted in the end though.

Regards,

Chris