# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save \$200. Learn More
Highlighted
Not applicable

## Straight table- Count totals in the last row

Straight Table Chart 1

Dimensions:            Expression:

Fruits                          ID

Vegetables

Drinks

Fish

Meat

Straight Table Chart 2

Dimension:            Expression

ID                            Only({<ID = >} Fruits)

For both tables the result would be similar, something like (Results based on selections):

IDFruitsDrinksVegetablesFishMeat
1AppleD1PotatoesSalmonLamb
3PineappleD3--Chicken
4WatermelonD4---
5MelonD5---
6-D6---

Now I was asked to present the Totals on the Last Row, the expected result should be:

 6 5 6 2 1 3

Problem:

In the first chart in the expression I just had to use the Total Mode (Numeric count). But when I go to the presentation tab to use the TOTALS option (Total on Last row with label =GetPossibleCount(Fruits) ), it only works for the first dimension (It applies the result for the all rows):

 6 5

Is there a way for me to count the results on the chart or get the expected requirement?

Regards,

Iuri

Tags (3)
1 Solution

Accepted Solutions
Contributor

## Re: Straight table- Count totals in the last row

Use this. !

It is working. I have tested it.

7 Replies
Highlighted
Contributor

## Re: Straight table- Count totals in the last row

Hi , since the level place is not a kind of writing the expression so it will not work as expected.

its not a good idea but we can take a text box at the place where you want the count for desired one

and use count(fruits) and keep the the text object at the same place by matching all color combination same.

Highlighted
Not applicable

## Re: Straight table- Count totals in the last row

Hi Rajesh,

Thank you for your response. I think that only way will be to create the same chart (with condition) then insert expressions with count.

Contributor

## Re: Straight table- Count totals in the last row

Use this. !

It is working. I have tested it.

Highlighted
Not applicable

## Re: Straight table- Count totals in the last row

Hi Hemantha,

Thank you for your help, was good learn this from you!

Highlighted
Contributor II

## Re: Straight table- Count totals in the last row

Hi Hemantha,

when i select any id from your application then i get wrong count. Are you sure is this the wright answer.

Highlighted
Not applicable

## Re: Straight table- Count totals in the last row

Hi Vipin,

I have applied the same logic in my main QVW and its working fine, you may have to look on the total mode options.

Highlighted
Not applicable

## Re: Straight table- Count totals in the last row

I forgot to mention that I removed the "-1"