Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Sum and Division

Hi,

I'm trying to Sum column A and divide the total by column B but my expression is not giving me the correct total.

My expression is:

************************************************************************************************************************************

sum({<Registration_Code={'2'}, Vehicle_Status = {'Normal'}, Contract_Prefix={'A'},YMDate = DisplayYM>} [Total_proceeds])

/

sum({<Registration_Code={'2'}, Vehicle_Status = {'Normal'}, Contract_Prefix={'A'},YMDate = DisplayYM>} Market_Value)

************************************************************************************************************************************

When I add Total_proceeds in Excel and divide it by the sum of Market_Value, I get 46.74% but qlikview is showing 51.74%.

Is there something wrong with the expression or should the expression be totally different?

tx,

S

1 Solution

Accepted Solutions
Not applicable

Sum and Division

Hi,

Are you using straight table or you're using pivot? If you're using straight, you should be able to change Total to SUM OF ROWS.

If you're using pivot, you will have to change the expression to aggregate in first row (since you add filters to your expression via Set analysis).

Regards, Miha

2 Replies
Not applicable

Sum and Division

Hi,

Are you using straight table or you're using pivot? If you're using straight, you should be able to change Total to SUM OF ROWS.

If you're using pivot, you will have to change the expression to aggregate in first row (since you add filters to your expression via Set analysis).

Regards, Miha

Not applicable

Sum and Division

thanks Miha, don't know how I could have missed that. Big Smile

Community Browser