Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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'))
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
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 .