Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Last week's value (avg) not displayed - why?

Hi,

can someone help me here, please? I'm completely flabberghasted.

- I have a Trellis_diagram showing, in four categories (the ALS from the table).

- Beside that, there is a diagram showing (on a dimension from an inline table)

     - last_week's value (avg)

     - last_month's value (avg)

<=> For a reason I just cannot get behind, last_week's value is not being displayed:

     - In the "main" diagram, when I select this year and last week, I can see that there is data on all (four) ALS from Mo-Fri (Sat and
         Sun are blank in the base_list);

     - When I add the corresp. listboxes and select last week, I can also calculate the avg. no problem, the blanks on Sat and Sun don't
        matter.

     <=> Still, a set_expression specifying last week does not work.

     <=> The expression for last_month's value works fine.

I am just going to make a small Excel file with the necessary fields to make this work and then I'll attach it.

Basically, though, the expression I use in that historical_diagram (where the dimension_points have no connection to the data_to_be_displayed) is

IF(Zeitraum = 'Vorwoche',
     
num(avg({1<Jahr = {$(=year(weekstart(today(), -1)))}, Woche = {$(=week(weekstart(today(), -1)))}, Werk_WE = {'74'}>} verfügbar), '#.##0')
        )

You see, there is an inline_table 'Zeitraum' which has two values: 'Vormonat' and 'Vorwoche'. Obviously that is last_week's value, so I want it displayed only for the dimension_point 'Vorwoche'.

Also, I have this same element in all of my apps and it always works otherwise ...

Thanks a lot!

Best regards,

DataNibbler

5 Replies
MK_QSL
MVP
MVP

Any chance that you can upload your sample file or apps?

PrashantSangle

Hi,

try your expression without using 1 before set analysis

like this.

IF(Zeitraum = 'Vorwoche',
     
num(avg({<Jahr = {$(=year(weekstart(today(), -1)))}, Woche = {$(=week(weekstart(today(), -1)))}, Werk_WE = {'74'}>} verfügbar), '#.##0')
        )

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
datanibbler
Champion
Champion
Author

Hi,

this is getting really curious - it works in the directory where we have our "live apps" - and when I save it under the same filename in a working_directory, it stops working ...

Not sure at all why this happens. I'll try to find out. Don't bother for now, though.

Thanks a lot anyway!

Best regards,

DataNibbler

datanibbler
Champion
Champion
Author


Hi,

I have no idea why it works differently here than everywhere else -

when I just change my IF_condition to

>>> IF(Zeitraum <> 'Vormonat' ...) <<<

(which really is the same, there are only two distinct data_points)

?=> all of a sudden, my column is there 😉

This is solved then.

Best regards,

DataNibbler

datanibbler
Champion
Champion
Author

Hi,

this is really maddening:

- It seemed for a moment that the same problem existed on every KPI_sheet in my app

=> Then I again noticed that, for some reason, it works in the "live App" - in one directory

<=> whereas, when I copy that to a working directory that the users don't have access to, it doesn't.

The app is exactly the same, the data is loaded from another server (an absolute path), so the different directories (which are on the same level anyway) can't actually make a difference.

I must get behind this or I'll spend forever chasing phantoms in this app...

Can you offer me any advice here?

thanks a lot!

Best regards,

DataNibbler

P.S.: That's not quite correct - or rather, it's not complete: When I change my If_construct like I indicated in the post above, which shouldn't be a difference at all (and there's no typo), then it works in both directories. So that's what I will do to get it working

P.P.S.: Screw me - now it works like I had it in the first place ... I think my PC has a sticky cache once again causing these really weird things ...

Just now I merely closed all instances of QlikView and reopened one and selected the app (working_directory) from the dialog instead of using the list - and it all works as if nothing had ever happened .... Grrwghhhmmbbbrrr