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

Combining a field and an expression into 1 straight table column?

I have an issue... where I'm combing data from multiple data sources... one is a SQL DB, that has a field "Check Amount"  which is the actual value of an issued AP check.

The other data source's AP system does not have an actual "Check Amount" field, it stores the NET INVOICE amounts and will display them as the issued check value... but no where is the actual cut check amount stored...

I need to be able to display both the "aggr(([Check Amount]),(Check Number])" from data source 1 and the returned value of "Aggr(sum([Net Amount]),[Check Number])" from data source 2 in a single column... so that for each check listed...regardless of the data souce, I get the Check Amount for that check in a single column.... is there any way to do this?

5 Replies
MarcoWedel

‌please post some sample data and the expected output.

thanks

regards

Marco

ramoncova06
Partner - Specialist III
Partner - Specialist III

simplest thing to do would be to rename both fields to a generic name and then just use the generic name to do the aggregation

Anonymous
Not applicable
Author

So simple like that.

Outstanding !

CB.

Not applicable
Author

I was able to make it work by just running an IF... as any check value from the company not using a "Check Amount" field would have a blank value... I specified to show the SQL field unless the check value was blank... if blank...show the calculated value from the other data source.

IF(aggr(([Check Amount]),[Check Number])>0, aggr(([Check Amount]),[Check Number]),Aggr(sum([Gross Amount]),[Check Number]))

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

looks like a lot of unnecessary overhead... Look into the Alt() function - that should possibly give you an answer in a simpler way.