Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
carolin01
Luminary Alumni
Luminary Alumni

Pivot chart Dimensionality error

Hi,

I´ve been working on the following statement within a pivot table. It is working in this way:

= num(If((Dimensionality()=0),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

//If((Dimensionality()=1),

//(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = //{'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=2),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

(sum({$<Next7DaysTotalHIS ={'1'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))))),$(vInteger))

//)

but it is not working in this way when I :

= num(If((Dimensionality()=0),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=1),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=2),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

(sum({$<Next7DaysTotalHIS ={'1'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))))),$(vInteger))

)

I believe that the mistake must be really small, something that I overlook right now...but I can´t find it...Does anybody see it?

Many thanks for your help!

1 Solution

Accepted Solutions
marcus_malinow
Specialist III
Specialist III

Hi Carolin,

I think one of your close parentheses at the end of your expression is in the wrong place.

try this:

= num(If((Dimensionality()=0),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=1),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=2),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

(sum({$<Next7DaysTotalHIS ={'1'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency)))))),$(vInteger)

)

View solution in original post

5 Replies
sunny_talwar

Can you try this may be:


=If(Dimensionality() <= 2,

Sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>} NettAmount$(vCurrency)),


Sum({$<Next7DaysTotalHIS ={'1'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency)) )

marcus_malinow
Specialist III
Specialist III

Hi Carolin,

I think one of your close parentheses at the end of your expression is in the wrong place.

try this:

= num(If((Dimensionality()=0),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=1),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

If((Dimensionality()=2),

(sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency))),

(sum({$<Next7DaysTotalHIS ={'1'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency)))))),$(vInteger)

)

View solution in original post

carolin01
Luminary Alumni
Luminary Alumni
Author

Hi Marcus,

thank you this was correct The last bracket hat to be behind the last vCurrecy and not vInterger.

sunny_talwar

I am still not sure why you are complicating the expression by having three conditions when one can do?

This won't work:

=Num(If(Dimensionality() <= 2,

Sum({$<Next7DaysTotalHIS ={'1'}, OverallTransactionDate = {'$(=vToday)'}, OrderPhase_Desc = {'HISBACKLOG'}>} NettAmount$(vCurrency)),


Sum({$<Next7DaysTotalHIS ={'1'}, OrderPhase_Desc = {'HISBACKLOG'}>}NettAmount$(vCurrency)) ), $(vInteger))

carolin01
Luminary Alumni
Luminary Alumni
Author

You are right, this should work as well! Probably I made it so complicated because I didn´t know what I wanted first. It´s good to have both now and helped me to understand Dimensionality much better