Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have a problem with this expression
sum({$<DO11_DATADOC1 = {">=$(vInizioData1)<=$(vFineData1)"}> + $<DO11_DATADOC1 = {">=MakeWeekDate(Year(Addyears(date('$(vInizioData1)'), -1)), week(Date('$(vInizioData1)')), Num(weekday(date('$(vInizioData1)')))) )<=MakeWeekDate(Year(Addyears(date('$(vFineData1)'), -1)), week(Date('$(vFineData1)')), Num(weekday(date('$(vFineData1'))))) "}>} DO30_QTA1/6)
it doesn't give me an error, but it doesn't give me a result. surely I have something wrong in the syntax, but I don't understand what.
thanks
It's a little difficult to figure out the issue without knowing the contents of your variables. One thing that I do see is that you need to wrap your functions within set analysis with $(=function()) to get it to calculate properly.
sum({$<DO11_DATADOC1 = {">=$(vInizioData1)<=$(vFineData1)"}> + $<DO11_DATADOC1 = {">=$(=MakeWeekDate(Year(Addyears(date('$(vInizioData1)'), -1)), week(Date('$(vInizioData1)')), Num(weekday(date('$(vInizioData1)'))))) )<=$(=MakeWeekDate(Year(Addyears(date('$(vFineData1)'), -1)), week(Date('$(vFineData1)')), Num(weekday(date('$(vFineData1')))))) "}>} DO30_QTA1/6)
One thing that you can do when trying to figure out what is wrong with a set analysis function is to look at the bottom of the Expression editor. Below, the "OK", Qlik will display how it is interpretting the expression. A screenshot of this would be more useful to diagnosing the issue.