Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
gauthamchilled
Creator
Creator

Set analysis won't calculates per dimension or per row..so what's the solution?

Hi All,

 

I understand that Set analysis won't calculates per dimension or per row..so what's the solution? I need to calculate the following but it returns only when specific dimension is selected.

 

(sum(Total {$< [Year] =
, [Qtr/Yr] =
, [Month] =
, [Mth/Yr] = {">=$(=monthstart( vReportAsAt, -24 ))<=$(=monthstart( vReportAsAt, -13 ))"}
,Product=p({<Customer= {"$(=getfieldselections(Customer))"}>})
,Customer=
> }
[Customer Payment] ))

 

I would like to calculate the value per row so i have to remove this p({<Customer= {"$(=getfieldselections(Customer))"}>}) 

and come up with some alternative to calculate per value of dimension.

 

please help.

 

Gautham

Labels (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

May be this?

Sum(Aggr( sum(TOTAL <Product> Premium),Insurer, Product))

Capture.PNG

View solution in original post

12 Replies
gauthamchilled
Creator
Creator
Author

Any help would be appreciated..Thanks

gauthamchilled
Creator
Creator
Author

bump

jonathandienst
Partner
Partner

I am not sure what you are wanting to do, or how you want o change it. Field selections are global and so are set expressions.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gauthamchilled
Creator
Creator
Author

Hi,

Eg:

Dimension: Insurer

Expression: (sum(Total {$< [Year] =
, [Qtr/Yr] =
, [Month] =
, [Mth/Yr] = {">=$(=monthstart( vReportAsAt, -24 ))<=$(=monthstart( vReportAsAt, -13 ))"}
,Product=p({<Insurer= {"$(=getfieldselections(Insurer))"}>})
,Insurer=
> }
[Premium] ))

Requirement: Total premium for the products per insurer(dimension value)

Product=p({<Insurer= {"$(=getfieldselections(Insurer))"}>}) --> To get same list of products owned by all other insurer . This expression works perfect if i select one insurer, if i remove the selection it is not. Because set analysis calculates per chart not per row.

Thanks,

Gautham

tresesco
MVP
MVP

Best way to get help in this would be sharing a sample app and explain the expected output there. 

gauthamchilled
Creator
Creator
Author

Hi Tresesco & Jo,

Attached a sample document and requirement in screenshot.

swuehl
MVP
MVP

I can't open your sample right now, but I think one issue might be the result of the Dollar sign Expansion.

What if you try

,Product=p({<Insurer= $::Insurer>})

or just

,Product=p()

 

instead?

 

gauthamchilled
Creator
Creator
Author

Hi Swuehi,

I attached a perosnal edition now

tresesco
MVP
MVP

May be this?

Sum(Aggr( sum(TOTAL <Product> Premium),Insurer, Product))

Capture.PNG

View solution in original post