Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
nadkalyan
Partner - Creator
Partner - Creator

Replacing Null using If then and then filtering issue

Hi,

I have Data in this format

TotalSpendBusinessUnitDelinquencyBusinessUnitDeliquentTotal Spend
A&E-PS-0234,307
A&E-PSA&E-PS14,77828,513
-A&E-PS3,8370

I have created a calculated Dimension to replace Null Values with data in any one of the columns as

BusinessUnit = if (isnull(TotalSpendBusinessUnit), DelinquencyBusinessUnit, TotalSpendBusinessUnit)

This is how data looks like with Business Unit Column

TotalSpendBusinessUnitDelinquencyBusinessUnitBusiness UnitDeliquentTotal Spend
-A&E-PSA&E-PS3,8370
A&E-PSA&E-PSA&E-PS14,77828,513
A&E-PS-A&E-PS0234,307

When I click on Business Unit Filter   selecting 'A&E-PS' based on above calculated dimension, the above table is filtered as only line that has 'A&E-PS' populated in all the dimensions as below -

TotalSpendBusinessUnitDelinquencyBusinessUnitBusiness UnitDeliquentTotal Spend
A&E-PSA&E-PSA&E-PS14,77828,513

How can I strucuture my above table to show all the lines of A&E-PS?

Any assistance would be a big help!!

Thanks

Kalyan

8 Replies
nadkalyan
Partner - Creator
Partner - Creator
Author

Any suggestions?

Not applicable

why don't you add a rowno() during your load statement and use it to display the information.

Just an idea

fosuzuki
Partner - Specialist III
Partner - Specialist III

Can't you create the Business Unit dimension in Script?

Not applicable

That should be the best way of doing it.

Philippe

nadkalyan
Partner - Creator
Partner - Creator
Author

I may be not that familiar with Loading Scripts but 'TotalSpendBusinessUnit' and "DelinquencyBusinessUnit' are both coming from 2 different tables and they are loaded in 2 different tabs in Qlikview joined by a dimension key. How can I load calculated BusinessUnit in the script?

nadkalyan
Partner - Creator
Partner - Creator
Author

Also if I do same cacluation for a list box, and select any one Business Unit it still gives me same result.  I think this is the way Qlikview handles Nulls to not populate even using Outer Joins. Any suggestions?

Not applicable

you could use the lookup () function in your load script

if (isnull(TotalSpendBusinessUnit) , lookup (  DeliquencyBusinessUnit      ),TotalSpendBusinessUnit ) as BusinessUnit.

Philippe

nadkalyan
Partner - Creator
Partner - Creator
Author

I have added this to the Load script but still same results. I have added following also to Load script and i get same results -

Not sure how Qlikview handles Null Dimensions.

Kalyan