Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Year

Hi all

I'm using this formula to calculate our last year revenue:

Num(sum({<Fact.Type = {'Sales'}, Calendar.Year = {2013}>} Fact.Net_Rev_EUR), '#''##0.00')

As I want to have it dynamic I tried this, but this doesn't work:

Num(sum({<Fact.Type = {'Sales'}, Calendar.Year = year(today())-1>} Fact.Net_Rev_EUR), '#''##0.00')

I'm sure somebody can tell me why?

thanks for your help

Oliver

1 Solution

Accepted Solutions
tresesco
MVP
MVP

try:

Num(sum({<Fact.Type = {'Sales'}, Calendar.Year = {'$(=year(today())-1)'}>} Fact.Net_Rev_EUR), '#''##0.00')

View solution in original post

3 Replies
tresesco
MVP
MVP

try:

Num(sum({<Fact.Type = {'Sales'}, Calendar.Year = {'$(=year(today())-1)'}>} Fact.Net_Rev_EUR), '#''##0.00')

its_anandrjs
Champion III
Champion III

Try like in SET analysis

Num(sum({<Fact.Type = {'Sales'}, Calendar.Year ={'$(=year(today())-1 )'} >}  Fact.Net_Rev_EUR), '#''##0.00')

In set analysis you can't write like

Calendar.Year = year(today())-1

Regards

Anand

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

=Num(sum({<Fact.Type = {'Sales'}, Calendar.Year = {$(=Year(Today())-1)}>} Fact.Net_Rev_EUR), '#''##0.00')


Regards,

jagan.