Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
pra_kale
Creator III
Creator III

Can we generate front-end summaries through script

Hi,

I have attached a one application in which i have created one simple summary through set analysis. Whether it is possible to generate similar kind of summary at a script level and afterwords out put will be get saved in a .csv file. I not want to use the macro to save the file in excel.

Please help.

Thanks in advance.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

INPUT:

LOAD Policy_no,

     Year,

     Month,

     Channel

FROM

[Issuance_1.xlsx]

(ooxml, embedded labels, table is Issuance);

TMP:

LOAD Channel, Month, Count(DISTINCT Policy_no) as CountMonthly

Resident INPUT

GROUP BY Channel, Month;

LEFT JOIN (TMP)

LOAD Channel, Count(DISTINCT Policy_no) as CountTotal

Resident INPUT

GROUP BY Channel;

Result:

LOAD Channel, Sum( If(Month=5,CountMonthly/CountTotal)) as Month..May, Sum( If(Month=12,CountMonthly/CountTotal)) as Month..Dec

RESIDENT TMP

GROUP BY Channel;

DROP TABLE TMP;

View solution in original post

5 Replies
swuehl
MVP
MVP

Maybe like

INPUT:

LOAD Policy_no,

     Year,

     Month,

     Channel

FROM

[Issuance_1.xlsx]

(ooxml, embedded labels, table is Issuance);

TMP:

LOAD Channel, Month, Count(DISTINCT Policy_no) as CountMonthly

Resident INPUT

GROUP BY Channel, Month;

LEFT JOIN (TMP)

LOAD Channel, Count(DISTINCT Policy_no) as CountTotal

Resident INPUT

GROUP BY Channel;

Result:

LOAD Channel, Sum( If(Month=5,CountMonthly/CountTotal)) as Month..May, Sum( If(Month=12,CountMonthly/CountTotal)) as Month..Dec

RESIDENT TMP

GROUP BY Channel;

DROP TABLE TMP;

pra_kale
Creator III
Creator III
Author

Hi,

Thanks swuehl...great.... It's working fine.

Just want to ask one more thing if i have one another table for premium then how can achieve this thing. I have attached one sample application after including this additional table.

swuehl
MVP
MVP

How do you want this premium table being merged with the previous table showing the monthly data?

pra_kale
Creator III
Creator III
Author

Hi,

I have attached the application and in the summary table i have included the premium.

Thanks for your help Swuehl.

swuehl
MVP
MVP

Maybe like attached