Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

showing profit based on selection

I have below data...

Customer NameCustomer CountryCustomer TotalSupplier NameSupplier CountryProductSupplier TotalProfit% Profit
CUST001Germany100SUPP001FranceOIL901010.00%
CUST003France300SUPP001FranceOIL2505016.67%
CUST002Germany200SUPP002GermanySOAP1505025.00%
CUST004USA400SUPP003ItalyEGGS380205.00%
CUST005Australia100SUPP004SpainRADIO802020.00%
CUST008France400SUPP004SpainRADIO30010025.00%
CUST006Italy200SUPP005USATV1752512.50%
CUST010Australia600SUPP005USATV5406010.00%
CUST007Germany300SUPP006IndiaPHONE2703010.00%
CUST009USA500SUPP006IndiaPHONE460408.00%


I need to show a profit table based on different selection. But want to make only one table.

My table should be displayed with below two columns.

Selection & PROFIT%....

where Selection could be any one from below which can be displayed as either list box, table box or multi box.

Customer Name

Customer Country

Supplier Name

Supplier Country

Product

Please help...

Regards,

Manish

1 Solution

Accepted Solutions
Not applicable
Author

10 Replies
Not applicable
Author

Any reply ?

Not applicable
Author

I've used this workaround before... it may work for you.

Create a variable, say vSelection.  Add that to an input box.  In the Constraints Tab select Predefined Values in Drop-Down.  Then check Listed Values and add this:

='" ", "' & Concat($Field,'","') & '"'

to the expression box.  This will give you a list of all available fields.  You can also input whatever you'd like and separate them with a semi-colon if you want to narrow your options.

Then within your table use =$(=vSelection) as your dimension and Profit% as your expression.  This should give you the info you are looking for.

Not applicable
Author

Thanks for your reply. Can you send me small example by creating qlikview document?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Have a look at the sample file.

    Is this what you are looking for..?

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi Kaushik,

Thanks for your example.

Looks like almost near to what I want.

Actullay, I want output table should be showing profit as below.

If I select Customer Country (I am talking about COLUMN NAME and not individual country), below table should be appear....

Customer CountryProfit%
Australia11.43%
France21.43%
Germany15.00%
Italy12.50%
USA6.67%
TOTAL13.06%

same way if I select Product, below table should be appear.

Product % Profit
EGGS5.00%
OIL15.00%
PHONE8.75%
RADIO24.00%
SOAP25.00%
TV10.63%
TOTAL13.06%

Also, I dont have any idea how can I have COLUMN NAMES as a selection. The way you have explained is 100% accurate if I consider wrt to whatever explained in my question, but after rechecking I found that my explanation itselt was wrong at that time.

Please let me know if this is possible.....

Thanks in advance.

Not applicable
Author

Create a inline table for the values you want. Create a List box that has always one value selected. Then add an expression as dimension like:

=If([Field]='Product',Products,if([Field]='Customer Country',Customer Country))

You would of course change the field names and values to match your data.

Not applicable
Author

can you create an example for me.... thanks...

Not applicable
Author

See sample

Not applicable
Author

Here is my example... although it's not working exactly as I thought.  It's only showing unique values.  It still may be worth checking out for ideas.