# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
New Contributor

## Bar Chart Count Minimum Value

Hello,

I am trying to build a bar chart counting the number of orders at each stage in the process, these stages are numerical.

My problem is that each order can have multiple stages within it, and I want to report on the earliest (smallest number) of those stages.

For example, I want to be able to have the minimum task stage as depicted below as a dimension in a bar chart.

 Order Reference Stage Minimum Task Stage ABCD 3 2 ABCD 2 2 ABCD 6 2 EFGH 1 1 EFGH 9 1 EFGH 4 1

I've tried using min(total<[Order Reference]>[Stage])

But that displays an Invalid Dimension error.

is there a solution to this?

Thank you

Labels (5)

• ### new to qliksense

1 Solution

Accepted Solutions
Valued Contributor II

## Re: Bar Chart Count Minimum Value

Hi,

In your chart, try as calculated dimension

``aggr(min(TOTAL <Order> Minimum_Task_Stage),Order,Stage)``

5 Replies
MVP

## Re: Bar Chart Count Minimum Value

May be you need this

``Aggr(Min(Stage), [Order Reference])``
New Contributor

## Re: Bar Chart Count Minimum Value

Thank you for this - I don't get an error anymore, but it is returning all values as null.

Valued Contributor II

## Re: Bar Chart Count Minimum Value

Hi,

In your chart, try as calculated dimension

``aggr(min(TOTAL <Order> Minimum_Task_Stage),Order,Stage)``

MVP

## Re: Bar Chart Count Minimum Value

What all dimensions do you have in your chart? Do you have any expressions?

New Contributor

## Re: Bar Chart Count Minimum Value

thank you both so much for your help.

The expression which worked was:

aggr(min(TOTAL <[Order Reference]> [Stage]),[Order Reference],[Stage])