# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

## Percentage of row total (expression)

Experts,

I have a question concerning the percentage of a row-total.

Dimensions used: Client {Client X, Client Y}, Type {Type 1, Type 2}

The table below is the one I am trying to build in Qlikview.

To get the % of the column (columns C and F), I am using the following expression:

 =sum({\$} Sales) / sum(Total {\$} Sales)

The problem is the % of the row (columns D and G). I am using the following expression but it does not give me the correct answer. The funny thing is, the sum of alle the % row's is always 100%, but the calculation (and the percentage itself) is never correct.

 =sum(Sales)/RangeSum(First(TOTAL Sum(Sales),1,NoOfColumns()))

Tags (4)
1 Solution

Accepted Solutions
MVP

## Re: Percentage of row total (expression)

Hi, following your columns C and F expression, for columns D and G can you try?:

=sum({\$<Month={"<= \$(=num(Month))"},Year={\$(=only(Year))}>} Sales)

/

sum(Total <Type>{\$<Maand={"<= \$(=num(Month))"},Year={\$(=only(Year))}>} Sales)

2 Replies
MVP

## Re: Percentage of row total (expression)

Hi, following your columns C and F expression, for columns D and G can you try?:

=sum({\$<Month={"<= \$(=num(Month))"},Year={\$(=only(Year))}>} Sales)

/

sum(Total <Type>{\$<Maand={"<= \$(=num(Month))"},Year={\$(=only(Year))}>} Sales)

Not applicable

## Re: Percentage of row total (expression)

Awesome! Looks like it was too easy to be true

Thanks a lot!