Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Possible to toggle measurements?

Hi,

Is it possible to toggle between measures that are directly correlated, such as Price in different currencies?

I have sample table:

[MODEL]          [PRICE EUR]          [PRICE USD]

product A          47.57                         65.87

product B          43.74                         60.56

product C          62.88                         87.06

All charts in the Qlik Sense dashboard currently measure on [PRICE USD]. Is there a way to set a filter/button to substitute [PRICE USD] for [PRICE EUR] in all instances that this measurement is used?

Thanks,

Kendrick

1 Solution

Accepted Solutions
Michael_Tarallo
Employee
Employee

Hi Kendrick, something like this?

Please see the attached video and sample.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik

View solution in original post

5 Replies
chriscammers
Partner - Specialist
Partner - Specialist

I would use a variable too but differently,

Create an Island table in your data model with one row for each currency you want to include.

I'll use th field name CurCode

set the value of a variable as follows

Set vVar = =Minstring(CurCode);

Then place your CurCode field on a sheet

In the expressions of your chart you will reference the variable to switch dimensions and expressions across the application.

I'm uploading a sample to give you a better idea but an important note, when I wrote this it was not possible to limit selections on a field to only one value so I used Minstring in the variable to make sure the charts don't go blank when more than one value is available. !

Not applicable
Author

Hi Chris,

I'm looking at the sample you provided but I'm unsure of how to proceed after setting the value of the variable.

Thanks

Michael_Tarallo
Employee
Employee

Hi Kendrick, something like this?

Please see the attached video and sample.

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik
Not applicable
Author

Awesome, the key piece I needed was how to create the filter in the first place:

LOAD * Inline [

Currency

USD

EUR

];

I'll go ahead and play around with my expressions to get the logic right.

Thanks!

Not applicable
Author

Hi Michael,

So it is possible to achieve what I want to do by editing each and every expression of my charts with an IF statement.

But most of the expressions already contain IF statements, which result in nested IFs.

For example: If([Currency] = 'EUR', If(GetSelectedCount(PERIOD) = 0, '-', Sum({$<BRAND = {'SAMPLE'}>}[SALES VALUE EUR])), If(GetSelectedCount(PERIOD) = 0, '-', Sum({$<BRAND = {'SAMPLE'}>}[SALES VALUE USD])))

I'm wondering if there's a way to consolidate this process by setting something in the Load Editor so that it affects all sheets in the app - something along the lines of:

If [Currency] = 'EUR', replace all metrics using [SALES VALUE USD] and [PRICE USD] with [SALES VALUE EUR] and [PRICE EUR], otherwise stick with [SALES VALUE USD] and [PRICE USD]

Thanks