

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two expressions with two dates in set analysis not working
Hi
I've got a pivot table with dimensions: Week and Weekday for a selected year. I have to show the sales for each week and week day for the selected year, and for the previous year.
I've got a calendar that gives me the fields week number and weekday and a fact table with the sales. In the calendar, for each date I also have the same date for the same week and weekday for the previous year.
I can get it work for the current year, but when I write the expression for the last year, I get 0 for all.
Expression for current year: sum(ImporteSinIVA)
Expression for last year: Sum({<Año, Mes, Trimestre, DiaSemana, Semana, Fecha, MismoDiaAA={'$(vMismoDiaAA)'}>}ImporteSinIVA).
Here, variable vMismoDiaAA = Date(Max(MismoDiaAA), 'DD/MM/YYYY'). The field "MismoDiaAA" is in the calendar, and it's calculated for each day, as stated above. The variable is defined with the sign "=" at the beginning.
I have attached the table should it help.
Any idea?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, does it work if you use an = in the variable in the set analysis (before the varibale name)..
MismoDiaAA={'$(=vMismoDiaAA)'}>}ImporteSinIVA)
?
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://community.qlik.com/t5/Qlik-Design-Blog/Quotes-in-Set-Analysis/ba-p/1471824
Double quotes looks to be a good option here.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately it doesn't work. However
Sum({<Año, Mes, Trimestre, DiaSemana, Semana, MismoDiaAA={"=$(vMismoDiaAA)"}>}ImporteSinIVA) will show the me same amount as the current date.
As you see, I have now changed the single quotes to double quotes, and added the = at the left of the "$". But I'm not there yet


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for that link.
I downloaded the latest version and tried the double quotes, but it's not working.
