Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Dimension Help

Hi Friends,

I want to create a dimension in coding or pie chart in design using below measures. Is there any way to do that. please help. Thanks

PAR 7 =sum(If(ArrearsRentals>0,(CapitalArrears/ArrearsRentals),0))

PAR 14 =Sum(If(ArrearsRentals>1,(CapitalArrears/ArrearsRentals),0))

PAR 30 =Sum(If(ArrearsRentals=3,(CapitalArrears/ArrearsRentals),If(ArrearsRentals>3,(CapitalArrears/ArrearsRentals)*2,0)))

PAR 60 =Sum(If(ArrearsRentals=5,(CapitalArrears/ArrearsRentals), If(ArrearsRentals=6,(CapitalArrears/ArrearsRentals)*2,                If(ArrearsRentals=7,(CapitalArrears/ArrearsRentals)*3, If(ArrearsRentals>7,(CapitalArrears/ArrearsRentals)*4,0)))))

Tags (1)
1 Solution

Accepted Solutions
antoniotiman
Honored Contributor III

Re: Dimension Help

Hi,

You can use ValueList() Function like this

Dimension : =ValueList('PAR7','PAR14','PAR30')

Expression :

Pick(Match(ValueList('PAR7','PAR14','PAR30'),'PAR7','PAR14','PAR30'),sum(If(ArrearsRentals>0,(CapitalArrears/ArrearsRentals),0)),Sum(If(ArrearsRentals>1,(CapitalArrears/ArrearsRentals),0)),
Sum(If(ArrearsRentals=3,(CapitalArrears/ArrearsRentals),If(ArrearsRentals>3,(CapitalArrears/ArrearsRentals)*2,0))))

Regards,

Antonio

9 Replies
dberkesacn
Contributor III

Re: Dimension Help

Hi,

You can make calculated dimension, in the expression editor you can us lot of function AGGR, IF ... for making custom dimension.

agigliotti
Honored Contributor II

Re: Dimension Help

yes each PAR become one calculated dimension on chart object.

Not applicable

Re: Dimension Help

Thanks daniel and Andrea, But I want to add all PARs into one dimention. Can I do that?

dberkesacn
Contributor III

Re: Dimension Help

Could you show some mock up, which describes the result?

Not applicable

Re: Dimension Help

As an example, In a pie chart, I want to show the contribution of PARs(Percentages). so there are PAR 7, PAR 14, PAR 30 and PAR 60. I want to show them in an one pie chart. I have attached an excel data sheet for relevant data. Thanks !

Not applicable

Re: Dimension Help

Hi, can anyone help me with this?

antoniotiman
Honored Contributor III

Re: Dimension Help

Hi,

You can use ValueList() Function like this

Dimension : =ValueList('PAR7','PAR14','PAR30')

Expression :

Pick(Match(ValueList('PAR7','PAR14','PAR30'),'PAR7','PAR14','PAR30'),sum(If(ArrearsRentals>0,(CapitalArrears/ArrearsRentals),0)),Sum(If(ArrearsRentals>1,(CapitalArrears/ArrearsRentals),0)),
Sum(If(ArrearsRentals=3,(CapitalArrears/ArrearsRentals),If(ArrearsRentals>3,(CapitalArrears/ArrearsRentals)*2,0))))

Regards,

Antonio

Not applicable

Re: Dimension Help

Thanks Anatonio for your great help.

Not applicable

Re: Dimension Help

Hi , can I create this dimension in the coding part as PAR?