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: 
Not applicable

Struggling with Set Analysis

Dear all

I have create a straight table using Set Analysis, It working fine after this

I am trying to make another table on same pattern but at this it is giving wrong result

Basically at this time result of this table not regarding Dimension it is not giving result of expression on line each, but overall total is there

don't know why it happening. Whole days I am struggling with it now I am fade up  & did not found my mistake or error

Please help to find out my mistake or finding out the batter way to solve it.

attaching my application here

Regards

-anil

2 Replies
cesaraccardi
Specialist
Specialist

Hi anilsknp!

Try this way:

(


     (
          (
               
SUM( {$ < trnType={'Sales'}, yearFin={"$(vLst1Year)"}, [Financial Year]= > } (BasicAmt*iExchangeRate) ) -
     
               
SUM( {$ < trnType={'Sales'}, fabType={'Synthetic'}, yearFin={"$(vLst1Year)"}, [Financial Year]= > } (stdPackAmt-PackAmt) )  
          ) -
          
SUM( {$ < trnType={'CRN','SALRET','PROCRN'}, crnType={'SP'}, yearFin={"$(vLst1Year)"}, [Financial Year]= > } invGrTotal )
     ) /
sum( {$ < trnType={'Sales'}, [Financial Year]= > } Sqmtr )
)

+

(
     (
          (
               
SUM( {$ < trnType={'Sales'}, yearFin={"$(vLst2Year)"}, [Financial Year]= > } (BasicAmt*iExchangeRate) ) -
     
               
SUM( {$ < trnType={'Sales'}, fabType={'Synthetic'}, yearFin={"$(vLst2Year)"}, [Financial Year]= > } (stdPackAmt-PackAmt) )  
          ) -
          
SUM( {$ < trnType={'CRN','SALRET','PROCRN'}, crnType={'SP'}, yearFin={"$(vLst2Year)"}, [Financial Year]= > } invGrTotal )
     ) /
sum( {$ < trnType={'Sales'}, [Financial Year]= > } Sqmtr )
)


This is done without the variables in the dividation and works because of the dimension.

Hope this helps.

Cesar

llauses243
Creator III
Creator III

Hi,

It this my proposal, pls to look image atteched,

Good luck, Luis