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

explain plz????

someone explain this???

Num( Sum( {$< CYTD={1}, Year=, Quarter=, Month=, [Month In Quarter]=>}

(Pick([ Key], [ Sales], [Qty Sold], [Gro Sales], [Pro Sales], [ List Price])) / [Divisor]), Pick(WildMatch([Divisor], 1, 1000, 1000000), '#,##0', '#,##0', '#,##0.0'))

2 Replies
rahulpawarb
Specialist III
Specialist III

Hello Suresh,

Please refer below given steps:

1. (Pick([ Key], [ Sales], [Qty Sold], [Gro Sales], [Pro Sales], [ List Price])) / [Divisor]

This expression will first select a measure from list [Sales], [Qty Sold], [Gro Sales], [Pro Sales] & [List Price] based on Key field value. If value of Key field is 1 then it will return [Sales], if 2 then [Qty Sold], if 3 then [Gro Sales] and so on. Post that it will divide it by [Divisor] field.

2. Sum({$<CYTD={1}, Year=, Quarter=, Month=, [Month In Quarter]=>}

        (Pick([ Key], [ Sales], [Qty Sold], [Gro Sales], [Pro Sales], [ List Price])) / [Divisor])

This statement will transform the result of point no. 1 to consider records for CYTD = 1 Only.

3. Pick(WildMatch([Divisor], 1, 1000, 1000000), '#,##0', '#,##0', '#,##0.0')

This expression will return the number format based on divisor value.

4. Num(Sum({$<CYTD={1}, Year=, Quarter=, Month=,[Month In Quarter]=>} (Pick([ Key], [ Sales], [Qty Sold], [Gro Sales], [Pro Sales], [ List Price])) / [Divisor]), Pick(WildMatch([Divisor], 1, 1000, 1000000), '#,##0', '#,##0', '#,##0.0'))

Finally we will use Num function to apply the formatting produced by point # 3 to the result of Point #2.

Hope this will be of help.

Regards!
Rahul

vinieme12
Champion III
Champion III

Num(     《《 for fomenting the returned value

Sum( {$< CYTD={1}, Year=, Quarter=, Month=, [Month In Quarter]=>}     《《  Set analysis, probably current ytd = yes and ignore all other date filters

(Pick([ Key], [ Sales], [Qty Sold], [Gro Sales], [Pro Sales], [ List Price]))   《《 enabled user to select the metrics they want to see so if sales is selected in list box then sales column will be aggregated similar for qty  ,gross sales , pro sales etc

/ [Divisor]), 

Pick(WildMatch([Divisor], 1, 1000, 1000000), '#,##0', '#,##0', '#,##0.0'))   《《 depending upon the divisor that is selected in listbox the number will be formatted thousands or millions .

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.