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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Manni_SM
Creator
Creator

Create category

Hi All,

@rubenmarin  igoralcantara  Vegar

i want to create below category group in script  for session monitor application can someone help on this ?

am new to qlik

Manni_SM_0-1749654224638.png

 

Labels (4)
27 Replies
rubenmarin

That's why I posted 'bucket' between quotes, because this are not traditional buckets, as the logic applied for 180 days include all the 90 and 60; and the 90 days include all the 60.

Based on the script, I see this more like precalculated fields than buckets.

marcus_sommer

I didn't notice that it shouldn't be separate buckets else that they could be overlapping. In this case a join-approach in the right order should be working.

If there are no special requirements to push the bucket-information within a dimension the above shown main-logic could be used within n expressions in which the buckets are queried within a set analysis, maybe like:

count({< BucketFlag = {">=n1<=n2"}>} User)

Manni_SM
Creator
Creator
Author

Hi @rubenmarin   @marcus_sommer  may be your correct My bad .. i have huge data in logcontent table and  am restricting only from session table thats y i see 8 records .  

now i want to restrict specific app in logcontent table  and dont want to load all the data  but getting failed with below error  i tried two methods none of them worked  😞  can you suggest in below code change?


// Rename table LogContent to LogContent_Prep;
// load *
// Resident LogContent_Prep where ObjectId='04fe-43aa-7849-u7jdoenyn897';
// drop table LogContent_Prep;

------------------------------------------

TempTable_test:
load * Resident
LogContent where ObjectId='04fe-43aa-7849-u7jdoenyn897';

Drop Table LogContent;
rename table TempTable_test to LogContent;

 

Manni_SM_0-1750938400978.png

 

rubenmarin

Hi, I don't see what error you get, maybe it's caused becasue a autoconcatenation, and you need to include 'NoConcatenate'

NoConcatenate Load * Resident LogConten...

In general, if you load a table with the same fields as the table before, Qlik will concatenate the rows to the last table, not creating a new one, to force to create the new table you should use 'NoConcatenate'

Manni_SM
Creator
Creator
Author

Below is error 

20250626T113747.162+0000 1376 rename table TempTable_test to LogContent
20250626T113747.162+0000 1379 session_count:
20250626T113747.163+0000 1380 Load count(Id) as count resident LogContent
20250626T113747.163+0000 1381 Where [Session Count]=1
20250626T113747.163+0000 Error: Table 'LogContent' not found
20250626T113747.196+0000 Execution Failed
20250626T113747.213+0000 Execution finished.

rubenmarin

The casuse is what I said before: TempTable_test is not created, the rows are concatenated to LogContent, then LogContent is dropped, so neither LogContent or TempTable_test exists on the model.

The rename sentence doesn't returns an error if he table doesn't exists, but the resident needs the table to exists.

As said before: use 'NoConcatenate'

Manni_SM
Creator
Creator
Author

yeah added and triggered will  update once it is done thanks .!

Manni_SM
Creator
Creator
Author

Finally it worked thanks alot @rubenmarin  @marcus_sommer  both of your suggestions helped me to learn many things 🙂

 

i am closed this thread  as of now .