Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
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: 
vtatarnikov
Creator
Creator

Choice of dates through variables in set-analysis

Please advise how to make an expression set-analysis.


Need to set the time (сompare the two periods). I set two variables in objects "slider / calendar": vBeg, vEnd. These variables are obtained by numerical, form 41275. DateSales field type date. I'm trying to write an expression in a straight table:


Sum({<DateSales={">=$(vBeg)<=$(vEnd)"}>}[amount])


Permutation of characters and manipulating types yielded no results. Help me, please.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Could be because of mismatch in format. Try like:

Sum({<DateSales={">=$(=Date(vBeg))<=$(=Date(vEnd))"}>}[amount])

Otherwise, try to post your sample qvw that demonstrates the issue.

View solution in original post

5 Replies
lft
Employee
Employee

Hi Vlad,

this is a very common issue.

The vBet & vEnd variables should not be numerical

PFA a working example

Loic

vtatarnikov
Creator
Creator
Author

Did exactly the same, but I have not worked

tresesco
MVP
MVP

Could be because of mismatch in format. Try like:

Sum({<DateSales={">=$(=Date(vBeg))<=$(=Date(vEnd))"}>}[amount])

Otherwise, try to post your sample qvw that demonstrates the issue.

lft
Employee
Employee

Hi Vlad,

If you have found the solution, can you mark this question as answered ?

Thanks a lot,

Loic

vtatarnikov
Creator
Creator
Author

Thanks, works!)