Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Multiple version selections

Hello, I´m trying to present comments that explains differences between two versions. What comments to present should be based on what Versions are selected in my economy application. The comments are edited by the business in an excel file where I have two fields for Version.

I´ll try to give a simplified example

I´ve got one transaction table called "Data" that looks like this

Version     Account     CostCenter     Amount

Actual          3100          10               100

Budget          4100          10               120

Forecast1     3100          20               140

Forecast2     4100          20               160

Now I want a textbox to present comments to explain differences between the versions, and I want that textbox to display those comments based on two selections in the field Version. The problem is that in the comments excel file I have two fields for version. This is what I´ve tried but of course it doesn´t work:

Concatenate (Data)

Load

     Version1 as Version

     Version1,

     Version2,

     Comment

FROM Comments.xls;

In both Version1 and Version2 the values can be any of Actual, Budget, Forecast1 or Forecast2, but never the same in both fields.

I´ve set up two Variables in the document:

vVersion1 = maxstring(Version)

vVersion2 = minstring(Version)

Statement in the textbox

=If(Version2 = '$(vVersion1)' or Version2 = '$(vVersion2)', Comment)

Doesn´t work of course, but now I´m out of ideas

1 Solution

Accepted Solutions
swuehl
MVP
MVP

In your text box, try

=only({<Version1 = {$(=minstring(Version))}, Version2 = {$(=maxstring(Version))}>} Comment)

Your combinations should always show Version1 as the minimum string, so I think it should be like this

CommentVersion1Version2
Amount is higher than budget due to new sales strategyBudgetForecast1
Amount is lower than budget due to bad weatherActualBudget
Amount is lower than forecast due to ......ActualForecast2
Amount is lower than forecast due to delay in marketing activitiesActualForecast1

View solution in original post

3 Replies
Gysbert_Wassenaar

I'm afraid your explanation is as clear as mud to me. Can you post an example document with example data and what the result should look like? A mock-up is excel might be the easiest way to demonstrate what you need.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Really, it´s perfectly clear to me . File attached, hope that makes it clearer.

swuehl
MVP
MVP

In your text box, try

=only({<Version1 = {$(=minstring(Version))}, Version2 = {$(=maxstring(Version))}>} Comment)

Your combinations should always show Version1 as the minimum string, so I think it should be like this

CommentVersion1Version2
Amount is higher than budget due to new sales strategyBudgetForecast1
Amount is lower than budget due to bad weatherActualBudget
Amount is lower than forecast due to ......ActualForecast2
Amount is lower than forecast due to delay in marketing activitiesActualForecast1