Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why an error in calculated dimension?

See attached QVW

Notice this load script, which will implicitly JOIN on the "Top Level Line" column.

LOAD * INLINE [

    Top Level Line, Value

    Other Income, 10

    Revenue, 5

];

LOAD * INLINE [

    Top Level Line, Detail Line, DetailValue

    Other Income, Misc Income, 1

    Other Income, Minor Income, 3

    Other Income, Special Income, 6

];

I want to identify Top Level Lines that have some extra detail.

In other words, Top Level Line where COUNT([Detail Line])>0

I've used that expression in 3 places.

  1. As the second dimension (where the first dimension is [Top Level Line]) -- this throws an error
  2. In the Background Color on the first dimension of [Top Level Line] -- this works
  3. In the Expression where the first and only dimension is [Top Level Line] -- this also works

Why does the first use fail?

1 Solution

Accepted Solutions
sunny_talwar

Won't give any error if you use Aggregate function here:

=Aggr(Count([Detail Line]), [Top Level Line])

Capture.PNG

I think when using it as a dimension you cannot use aggregation such as count, sum, min, max without Aggr() function

View solution in original post

2 Replies
sunny_talwar

Won't give any error if you use Aggregate function here:

=Aggr(Count([Detail Line]), [Top Level Line])

Capture.PNG

I think when using it as a dimension you cannot use aggregation such as count, sum, min, max without Aggr() function

Not applicable
Author

Thanks Sunny, I agree with your diagnosis:


I think when using it as a dimension you cannot use aggregation such as count, sum, min, max without Aggr() function


Do you know why that's true?

Or do you know if that's documented somewhere in Qlikview documentation?

Anyone?