Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to turn a dimension in the same table?

Hi,

I've encountered a problem I can not solve and need some help!

I have the dimensions "From Destination" and "To Destination". I use this to calculate the number of tons between differents locations, with the expression sum(tons). But, I need to turn this expression to how many tons who are sent back along the same line in return.

In other words, I must fetch up the "To Destination" and make it calculate this as an "From Destination". I tried to use SET expression like Sum({$<[From Destination] =  {[To Destination]}>} Tons), but it returns only zero...

Is there anyone who can help with some suggestions here?


///Tom

13 Replies
Not applicable
Author

From destinationTo destination

Tons

OsloLondon20000
LondonOslo10000

This is what the end result should look like:

Example.JPG

I have on dimension for Tons, From and To. When you choose From, the amount of tons sendt to the To destination  will be showed. I need to turn this this, sow the T"To destination" will be the same as the "From destination". That way I will get the retured tons on the same transportation line.

From Oslo to London 20 000 tons - Returned  (London - Oslo) 10 000 tons.

The problem is to get QV to understand that the calculations of the returned (10 000) need to pick the "To Destination" and use it as a "From Destination"....

That's why i tried:

From Oslo to  London: Sum(tons) - From London to Oslo: Sum({$<[From Destination] =  {[To Destination]}>} Tons)

///Tom

ankitaag
Partner - Creator III
Partner - Creator III

Hi Tom,

Finally !! so glad to do this.

Kindly find the attached app.

Final result is exactly what you want.

Hope this is correct and helpful!

Thanks and Regards,

Ankita

Not applicable
Author

Hi,

This is exactly what I need! I'm very impressed!!

Thank you!!!

This solve my problem.

///Tom

ankitaag
Partner - Creator III
Partner - Creator III

Thankyou so much