Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
krishnagutha1294
Partner - Contributor II
Partner - Contributor II

set analysis expression

Hi all

I am having an expression like below

Sum({<year={2015}>}Sales)/Sum(Profit) + (Sum({<year={2016}>}Sales))/Sum({<Product={Apple}>}profit)

 For 2015 denominator is Sum(Profit) and 2016 Denominator is Sum({<Product={Apple}>}profit)

but if execute above expression both denominator taking Sum({<Product={Apple}>}profit) please can any one resolve above condition.

Thanks in advance

 

Labels (1)
  • SaaS

17 Replies
sunny_talwar

Would you be able to share a sample where we can see the issue?

krishnagutha1294
Partner - Contributor II
Partner - Contributor II
Author

Hi Kindly find the attached QVW file for your reference and as well as excel file what data we load.

I have did 2 no of  pivot table with different expressions.

1 expression with filter condition in denominator other 1 without filter condition

krishnagutha1294
Partner - Contributor II
Partner - Contributor II
Author

Kindly can anyone help me to resolve above mention problem.

 

Thanks in Advance

sunny_talwar

Do you notice that your supplier field values are all upper case, but you are using Captilized Supplier name in set analysis (SAMSUNG vs Samsung)?

image.png

So, if I change my expression to

(SUM({<COMODITY={'HDD'}>}[SR NO])/SUM(BU)) + (SUM({<COMODITY={'MEMORY'}>}[SR NO])/SUM({<SUPPLIER= {'SAMSUNG'}>}BU))

It gives me this

image.png

krishnagutha1294
Partner - Contributor II
Partner - Contributor II
Author

Thanks its working in Qlikview but in Qliksense its not working pls help me for that

sunny_talwar

QlikView and Qlik Sense work the same exact way. If you are able to share a sample where we can see the issue, I am more than happy to take a look

krishnagutha1294
Partner - Contributor II
Partner - Contributor II
Author

Hi my sense desktop version is not responding that's why i am unable to send QVF file.

But i have check same expression in sense hub its not working.

using this expression

(SUM({<COMODITY={'HDD'}>}SR_NO)/SUM(BU)) + (SUM({<COMODITY={'MEMORY'}>}SR_NO)/SUM({<SUPPLIER= {'SAMSUNG'}>}BU)) 

I am getting the results like below. Pls help me

sample1.png

krishnagutha1294
Partner - Contributor II
Partner - Contributor II
Author

Pls some one solve above problem

sunny_talwar

Your field name is COMMODITY, not COMODITY... in QlikView you sent it to me as COMODITY which is why I had to use COMODITY. May be that is the issue?