Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

How to implement the below sql quries into qlikview?

Hi

please find the below quires and how to implement into qlikview.

1)

select  a1.time, a.market , a1.activity_type, sum( sales )

from  a1

where a1.time >= '01-Jan-2018'

group by a1.time, a1.market , a1.activity_type

having sum( sales ) <> 0

2)"select distinct a1.market, b1.*

from b1,a1

where a1.market = b.marketcode

and

a1.time >= '01-Jan-2018'"

3)"select distinct a1.activity_type, c1.*

from c1,a1

where

a1.gactivity_type = c1.BUSINESS_LINE_GARP_CODE

and a1.time >= '01-Jan-2018'"

4)"select *

from d1

where d1.DATE >= '01-Jan-2018'"

all 4 expressions in one application and a1,b1,c1,d1 are the tables names.

thanks

daisy

5 Replies
shiveshsingh
Master
Master

Can you share sample data?

daisy1438
Contributor III
Contributor III
Author

can you share your personal email id

rakeshkumar1890
Creator
Creator

Share your sample data

Anil_Babu_Samineni

Perhaps this?

1) Load a1.time, a1.market, a1.activity_type, sum(sales) <> 0;

Load time as a1.time, market as a1.market , activity_type as a1.activity_type, sum(sales)

from  a1 where time >= '01-Jan-2018'

group by time,market,activity_type;

2) Load distinct market as a1.market from a1

Join

Qualify *;

Load distinct * From b1 where market = marketcode and time >= '01-Jan-2018';


3) Load distinct activity_type as a1.activity_type from a1

Join

Qualify *;

Load distinct * from c1 where gactivity_type = BUSINESS_LINE_GARP_CODE and time >= '01-Jan-2018';

4) Load * from d1 where DATE >= '01-Jan-2018';

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
daisy1438
Contributor III
Contributor III
Author

Hi anil if get any idea on below requirement please help on this.

I want do in back end level(script)

target date changed count the ID's.


I have table fields

table:

Issu_ID

date_upload

Taget_date



-> KPI chart if the user selects any two dates compare those two dates.if maximum date and maximum previous dates in the Taget_date field are different then caluclate the count id's.



Example:


Issue_ID      Date_upload      Target_date

 

01                01-01-2018           10-05-2018

01                03-01-2018           15-05-2018

02                01-01-2018           10-05-2018

02                03-01-2018           10-05-2018

03                01-01-2018           10-05-2018

03                03-01-2018           16-05-2018



In the above table if we select dates in the date upload field i.e., 01-01-2018 and 03-01-2018 then count is 2 because id 01,03 target dates are changed and id 02 target dates are not changed.

so just count the Issues_ID when user select any two dates(ex:01-01-2018 is min date and 03-01-2018 is max date)compare those two dates if min date targetdate is onedate and max date targetdate is change to another date than caliculate the Issues_ID count.



I need quires for the above requirements in the back-end level.and write the expression front end level also if any simple way.

I have written quires in the front end level but the performance is slow and it is showing an error in the chart i.e., time out.

                        


Thanking you.