Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression (Year(Today)) is ignored

Dear all,

coming off from this discussion I have a problem with the following expression:

(Sum({$<Year={"(=Year(Today()))"}>}Kosten)+Sum({$<Year={"(=Year(Today()))"}>}Materialeinkauf))

/(Sum({$<Year={"(=Year(Today()))"}>}[Erlös])+Sum({$<Year={"(=Year(Today()))"}>}Schlussrechnung))


As far my knowledge goes, the "$" shall make shure, that just the period of the current year is considered. But it shows the value of the whole data. Furthermore I can change the expression (Year(Today)) to anything else, but nothing happens with the value. Any idea what I did wrong with my formula?


Thanks in previous for the help.

14 Replies
martinpohl
Partner - Master
Partner - Master

oh, it is 2018 🙂

OmarBenSalem

As I told him; the Year field he's using is not a field !

sasikanth
Master
Master

HI ,

Try with   Max(Year) 

Exp:

(Sum({$<Year={"$(= max(Year))"}>}Kosten)+Sum({$<Year={"$(= max(Year))"}>}Materialeinkauf))

/(Sum({$<Year={"$(= max(Year))"}>}[Erlös])+Sum({$<Year={"$(= max(Year))"}>}Schlussrechnung))

Anonymous
Not applicable
Author

I found the big mistake. I made a mistake in interpreting my source and didn't think about the point omar mentioned.

I tried it like this for 2017 and it works perfect:

(Sum({1<Jahr={"2017"}>}Kosten)+Sum({1<Jahr={"2017"}>}Materialeinkauf))

/(Sum({1<Jahr={"2017"}>}[Erlös])+Sum({1<Jahr={"2017"}>}Schlussrechnung))


Now the left challenge is to replace 2017 by the current year, but I will try this with all the help I already got. Alwqays great to get such good help as a starter with QLIK.

pradosh_thakur
Master II
Master II

Please close both the threads by marking the answers correct and which have helped you as helpful.

Learning never stops.