Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Dimension Limits

I have a table

LOAD * INLINE [

    F1, F2, F3

    a1, 1, 6

    a2, 2, 5

    a3, 3, 4

    a4, 4, 3

    a5, 5, 2

    a6, 6, 1

];

and my chart gives me this

F1 sum(F2-F3)
0
a1-5
a2-3
a3-1
a41
a53
a65

and I wanted to get only negative values

F1 if(sum(F2-F3)<0,sum(F2-F3))
a1-5
a2-3
a3-1

and I wanted to get the smallest 2, basically -5 and -3 and so I applied for Dimension Limits.

and I don't get any data

F1 if(sum(F2-F3)<0,sum(F2-F3))

Attached is the qvw.

1 Solution

Accepted Solutions
Highlighted

Re: Dimension Limits

I think the issue was related to the false statement in your if statement. We were leaving it as null, which was causing the issue. Try this expression:

=If(Sum(F2-F3) < 0, Sum(F2-F3), 0)

Capture.PNG

View solution in original post

9 Replies
Highlighted
Partner
Partner

Re: Dimension Limits

which object you choosed for chart

i tried with a straight table and it works

Highlighted

Re: Dimension Limits

May be try this expression:

=If(Rank(-1*If(Sum(F2-F3) < 0, Sum(F2-F3))) <= 2, If(Sum(F2-F3) < 0, Sum(F2-F3)))


Capture.PNG

Highlighted

Re: Dimension Limits

I think he wants to see just lowest 2 values: -5 and -3

Highlighted
Partner
Partner

Re: Dimension Limits

Thanks Sunny.

I want to understand if Dimension Limits is working as expected.

And I am worried to use this big expression as Sum(F2-F3) itself is a complex in my real scenario.

Highlighted
Partner
Partner

Re: Dimension Limits

okay, i need to read until end

Highlighted

Re: Dimension Limits

I think the issue was related to the false statement in your if statement. We were leaving it as null, which was causing the issue. Try this expression:

=If(Sum(F2-F3) < 0, Sum(F2-F3), 0)

Capture.PNG

View solution in original post

Highlighted
Partner
Partner

Re: Dimension Limits

follow These instructions and you get what you want:

1) define a new Expression with sum(F2-F3) on first place

2) define Dimension Limits (resticht values... Show only smallest 2 values)

3) tab presentation: hide Expression (first one with sum(F2-F3)

here is what i get:

Highlighted
Partner
Partner

Re: Dimension Limits

Thanks much.

I missed a silly thing

Cheers,

Naresh

Highlighted

Re: Dimension Limits

I am glad we were able to resolve it quickly