Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator III
Creator III

Comparison between not associate data

Hi Community,

I have one scenario, I have to compare data between non-associated data.

DataSet: 

CODECATEGORYIndustryInsCodeSalary
AAAQlik SenseBankingFIN.01.005.E4A249996
AAAQlik SenseBankingFIN.01.005.E4A5000
AAAQlikViewBankingAK.02.001.P4038950
ABCQlikViewBankingAK.02.001.P4039975
ABCQlikViewBankingAK.02.001.P404000
ABCQlikViewBankingAK.02.001.P4039975
BBBSWIFTBankingAK.02.001.P4038000
XYZSpot FireBankingFIN.02.001.P6056375
XYZSpot FireBankingFIN.02.001.P601350
123SplunkBankingFIN.03.001.E301200
311BOBankingFIN.03.001.E204590
AAAQlik SenseBankingFIN.03.001.E13148596
1056TableauBankingTIN.03.002.E10224052.5
ABCQlikViewBankingFIN.03.001.M5056373
ABCQlikViewBankingFIN.03.001.M50780
ABCQlikViewBankingFIN.03.001.M5056375
1056TableauBankingFIN.03.002.M582808
1056TableauBankingFIN.03.002.M5100000
1056TableauBankingFIN.03.002.M5113861
ABCQlikViewBankingFIN.03.002.M556375
POPMicro StrategySalesAK.02.001.P4056375
POPMicro StrategySalesAK.02.001.P4038950
POPMicro StrategySalesFIN.03.001.E1339975
POPMicro StrategySalesFIN.02.001.P9038000
MANPower BISalesFIN.02.001.P6056375
MANPower BISalesFIN.03.001.E3082808
MENBirtSalesFIN.03.001.E20107000
MENBirtSalesFIN.03.001.E13113861
NINAgileSalesTIN.03.002.E1056375
NINAgileSalesFIN.03.001.M5038000
NINAgileSalesFIN.03.001.M5056375

I did group by Salary based on Industry and InsCode  and applied back to main table using mapping table

Row LabelsAverage of Salary
Banking-AK.02.001.P4032180
Banking-FIN.01.005.E4A127498
Banking-FIN.02.001.P6028862.5
Banking-FIN.03.001.E13148596
Banking-FIN.03.001.E204590
Banking-FIN.03.001.E301200
Banking-FIN.03.001.M5037842.66667
Banking-FIN.03.002.M588261
Banking-TIN.03.002.E10224052.5
Sales-AK.02.001.P4047662.5
Sales-FIN.02.001.P6056375
Sales-FIN.02.001.P9038000
Sales-FIN.03.001.E1376918
Sales-FIN.03.001.E20107000
Sales-FIN.03.001.E3082808
Sales-FIN.03.001.M5047187.5
Sales-TIN.03.002.E1056375
Grand Total64604.04839

Please find the attached spread sheet, I did exercise.

confusing with explanation, so attached spread sheet - hope it helps!

Thanks in Advance! 

 

Labels (1)
10 Replies
edwin
Master II
Master II

you may not want to determine the average in the script.  because when the user filters on code for example, then the average is wrong as the average disregards the code.  you can easily determine the average in the UI instead:
avg(salary) and you can get the comparison using Salary against the average (with Salary as a dimension)

paulwalker
Creator III
Creator III
Author

Thanks for response!

Your right - average calculation is normal,  but whatever user selected first set of selection - what we have data displayed and aggregated data, this data should be apply to second set of selections.

Created simple data set and attached spread sheet in detail..

I think hope it help below screen and attachment

paulwalker_0-1613117532086.png

 

paulwalker
Creator III
Creator III
Author

Anyone did face such type of requirement!

Please I need suggestions.

edwin
Master II
Master II

try this:

edwin_0-1613159614024.png

 

edwin
Master II
Master II

expression you are looking for is
=avg(total <InsCode> Salary)

InsCode needs to be in the chart so it can be properly aggregated

edwin
Master II
Master II

im replying in reverse fashion

the understanding here is you want the average per InsCode regardless of Category and Industry and you want to compare per category and industry

also InsCode can be shared across Category and Industry looks like

paulwalker
Creator III
Creator III
Author

Anyone can help me on this?

I'm expecting result as attached screen.

paulwalker
Creator III
Creator III
Author

It's not working the way I expect it to

paulwalker
Creator III
Creator III
Author

@sunny_talwar@MayilVahanan 

I tried many ways, but could not achieve.

can you please have a look ?