Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

imrasyed
Contributor

Resident

Hi Experts,

I have a Table and I need to do some calculations with grouping across dimensions.

I am able to do it using Resident but not able to get all the fields from the first table.

Can anyone help me out on this?

1 Solution

Accepted Solutions
ychaitanya
Contributor III

Re: Resident

TEST:

Load A,

B,

C

FROM SOURCE_TABLE:

I hope you're trying something like this ,

noconcatenate

TEST1:

Load A,

Sum(B) as Total,

C

Resident TEST

group by A;

if you try to add like above , QLik throws error as you can't add C which is not in GROUP BY Clause.

if you need to use all the columns  from Source table and you want to use GROUP BY ,

you need to add all cols in group by clause (OR)  do the aggregation and perform the Outer Join to Source table to get all the fields.

Hope this Helps

Thanks

CY

4 Replies
YoussefBelloum
Esteemed Contributor

Re: Resident

Hi,

you should maybe add more details here, try to attach the script, the exptect output etc

rittermd
Honored Contributor

Re: Resident

When you do a resident load from a previously loaded table you should get everything in that table unless you have not specified all of the fields to load.  That said unless you modified some fields in the original load.

When I do that I find that it is better to store the first table in a QVD and then Load that QVD in the next step to do the calculations and other changes.

Can you provide more details?

ychaitanya
Contributor III

Re: Resident

TEST:

Load A,

B,

C

FROM SOURCE_TABLE:

I hope you're trying something like this ,

noconcatenate

TEST1:

Load A,

Sum(B) as Total,

C

Resident TEST

group by A;

if you try to add like above , QLik throws error as you can't add C which is not in GROUP BY Clause.

if you need to use all the columns  from Source table and you want to use GROUP BY ,

you need to add all cols in group by clause (OR)  do the aggregation and perform the Outer Join to Source table to get all the fields.

Hope this Helps

Thanks

CY

imrasyed
Contributor

Re: Resident

Yes Chaitanya you are right.

I am getting the mentioned error.

Let me try using outer join.

Community Browser