Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to show the Difference

Hi friends,

I wanna show the diff b/w two values dynamically. I've 4 expression and one more expression for Difference using in Ad-hoc concept.

when I select any two exp from that 4 it show the Diff b/w that 2 exp in the same table. based on current selection only it should show

For Example

if I've Exp like below,

%Expression

Total Sales-14,  //(Sum TSales-14)

Total Sales-15, //(Sum TSales-15)

Sales-14,         //(Sum Sales-14)

Sales-15,        //(Sum Sales-15)

Diff                 //(???????????????)

for Diff I don't know what kind of exp I 've to try..

User can select any 2 dimension to know the Diff. So I need that exp as Dynamically (Based on User current Selected Expressions)

Thanks

in advance

Abinesh S

1 Solution

Accepted Solutions
sfatoux72
Partner - Specialist
Partner - Specialist

If your 2 expressions are dynamically selected, you could write your difference like that:

= Column(2) - Column(1)

View solution in original post

9 Replies
Anonymous
Not applicable
Author

Try like this?

=(Sum TSales-14) - (Sum TSales-15)  as per your requirement

Not applicable
Author

Thanks for you reply Balraj,

I need that exp dynamically.... In your exp it show only Diff b/w 14 &15 Total sales only but In user point of view they will select any exp like "TSale-14 - Sale-15" or "Sale-14 -TSale-15" So I need that Diff exp completely based on user selection only...

Anonymous
Not applicable
Author

PrashantSangle

Hi,

Adhoc Reporting will help you to achieve above concept.

You need to customize that concept according to your requirement.

For how to create Adhoc report navigate below link

Adhoc reporting in Qlikview

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sfatoux72
Partner - Specialist
Partner - Specialist

If your 2 expressions are dynamically selected, you could write your difference like that:

= Column(2) - Column(1)

Not applicable
Author

Thanks Sebastien its work properly.. Thank you very much. And one more doubt when I select the exp in adhoc it sort the exp by values but I wanna sort the exp by user selection wise.

For eg:

Sales=1000

Target=1100

User select the Target 1st and the select sales 2nd and check the diff in that time in qlik view it show "-100" based on values it sorting itself....  guys help on this also

Not applicable
Author

Guys thanks to all of you I got the solution for my 2nd query also...

sfatoux72
Partner - Specialist
Partner - Specialist

New question --> new thread   

It will more helpfull for other users.

You could refer to this thread and add a sample of your application, it will be more simple to understand what you did and how to help you.

Anonymous
Not applicable
Author

The expressions are taken in the list box and take the text box write the expression getselectioncount(field)- ( getselectioncount(field)-1)