Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know this is just a syntax issue but I can't seem to find a clear explanation of how to do this. I just want to use the year expression to refine my sum value. I can put a hardcoded value like 2022 in and it works fine, like this:
Year = {2022},
But this doesn't work
Year = Year(vSelectionDateStart),
However if I display just this:
Year(vSelectionDateStart)
it gives me the year like I would expect.
Can someone please explain what I'm doing wrong and if you'd be so kind why?
Here's the complete block for reference:
sum({<
Year = {2022},
// Year = Year(vSelectionDateStart),
[Account.Account Number]={660}
>}
[Transactions.Amount With Sign]
)
Thanks!
This was on the right track, I had to drop the second $ and parenthesis.
This worked:
Year={$(=Year(vSelectionDateStart))},
Thanks for getting me headed in the right direction!
Hi,
You can try :
Year={$(=Year($(vSelectionDateStart)))}
Hi
Try this
sum({<
Year = {'$(vSelectionDateStart)'},
[Account.Account Number]={660}
>}
[Transactions.Amount With Sign]
)
Unfortunately neither of these seem to work. I failed to explain the date format in the variable. It's 03/01/2022 to clarify.
Year = {'$(vSelectionDateStart)'},
The above doesn't seem to have the year function to strip that value out.
Year={$(=Year($(vSelectionDateStart)))},
In this everything in the braces goes gray like it's all being interpreted as a literal (I think, new to qlik).
Any other suggestions?
This was on the right track, I had to drop the second $ and parenthesis.
This worked:
Year={$(=Year(vSelectionDateStart))},
Thanks for getting me headed in the right direction!