Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Announcements

SYSTEM MAINTENANCE: ** Thurs., Sept. 19, 1 AM ET,** Platform will be unavailable for approx. 60 minutes.

- Qlik Community
- :
- Forums
- :
- Analytics
- :
- App Development
- :
- Re: Variable Extension and Pick Function

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Nolan

Contributor III

2021-02-16
11:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Variable Extension and Pick Function

Good Afternoon,

We are using the variable extension and pick function shown above to have 6 different options for a KPI on our sheet. There are 6 different toggle buttons to flip between them. Everything is working perfectly, except one of our options is in Sales ($) and the rest of the 5 are all in units. Is it possible to change the formatting so only the first option shows as $?

The KPI expression is:

pick(vDashboard,

Sum([ TD Quota]),

Sum([ FFX Quota]),

Sum([IV Quota]),

Sum([Product Quota]),

Sum([Base Quota]),

Sum([HSM Quota]))

There is obviously the number formatting drop down, but as far as I can tell whichever option you pick then applies to all 6 of the variations.

Any advice is much appreciated.

Nolan

- Tags:
- extension

1,174 Views

1 Solution

Accepted Solutions

skamath1

Creator III

2021-02-22
12:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

You were missing one comma in the expression num(Sum([HSM Quota])'#,###.00')

Below is the correct expression..

pick(vDashboard,

num(Sum([TD Quota]),'$#,###.00'),

num(Sum([FFX Quota]),'#,###.00'),

num(Sum([IV Quota]),'#,###.00'),

num(Sum([Product Quota]),'#,###.00'),

num(Sum([Base Quota]),'#,###.00'),

num(Sum([HSM Quota]),'#,###.00')

)

1,103 Views

7 Replies

skamath1

Creator III

2021-02-16
12:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

you can use the num function with the sum.

num(sum(Sales),'$#,###.00') )

1,161 Views

Nolan

Contributor III

2021-02-16
12:23 PM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you for the response!

I have changed the Formatting drop down to 'Number' and added this to the expression:

pick(vDashboard,

num(Sum([TD Quota]),'$#,###.00'),

Sum([FFX Quota]),

Sum([IV Quota]),

Sum([Product Quota]),

Sum([Base Quota]),

Sum([HSM Quota]))

Unfortunately the first toggle still appears as Units. Is this the correct notation? Any other suggestions?

1,154 Views

skamath1

Creator III

2021-02-16
12:33 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

add the num to other expressions of sum

like num(sum( [yourfieldname],'#,##0')

also check the property of the number expression as below.

1,148 Views

Nolan

Contributor III

2021-02-22
12:26 PM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

I have tried this and am still getting an error: 'error in expression: ")" expected'

I believe my syntax is correct, so not sure what the problem is. Any advice?

pick(vDashboard,

num(Sum([TD Quota]),'$#,###.00'),

num(Sum([FFX Quota]),'#,###.00'),

num(Sum([IV Quota]),'#,###.00'),

num(Sum([Product Quota]),'#,###.00'),

num(Sum([Base Quota]),'#,###.00'),

num(Sum([HSM Quota])'#,###.00')

)

1,110 Views

skamath1

Creator III

2021-02-22
12:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

You were missing one comma in the expression num(Sum([HSM Quota])'#,###.00')

Below is the correct expression..

pick(vDashboard,

num(Sum([TD Quota]),'$#,###.00'),

num(Sum([FFX Quota]),'#,###.00'),

num(Sum([IV Quota]),'#,###.00'),

num(Sum([Product Quota]),'#,###.00'),

num(Sum([Base Quota]),'#,###.00'),

num(Sum([HSM Quota]),'#,###.00')

)

1,104 Views

Nolan

Contributor III

2021-02-22
12:48 PM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

sorry for the silly mistake!

Thank you I have now put in the correct expression and I have changed the Number Formatting to measure expression. However when I use the Toggles the number formats are all still the same:

(1st KPI which should be $)

(2nd KPI which should be #)

1,096 Views

skamath1

Creator III

2021-02-22
01:07 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Is it possible to attach a sample qvf file to really look at the chart object and expressions? otherwise it is difficult to understand the issue.

1,091 Views

Community Browser