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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasgupta
Creator
Creator

Set Expression for Transaction

Hi Every one

I have three tables Location master, Transaction master and Transaction detail find the attached excel sheet for sample data.  Plz help me for design a set expression for following (SQL)condition.

  select * from

(select loccd,

  round((sum(case when TdFrRmLoc=loccd and TdFrRmDc='c' and tdt between '01/06/05' and '30/08/05'  then TdRmWt else 0 end)+

  sum(case when TdToRmLoc=loccd and TdToRmDc='C' and tdt between '01/06/05' and '30/08/05' then TdRmWt else 0 end)),3) as Issue

  from  txn

   join txnd on ttc=tdtc and tyy=tdyy and tchr=tdchr and tno=tdno 

  join loc on (LocCd=TdFrRmLoc or LocCd=TdtoRmLoc) and LocTyp='S'

  group by loccd)

Thanks

Vikas

0 Replies