Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
george456
Creator
Creator

Top 10 Calculation

Dear Community

I am trying to calculate the Top 10 SKU into a one line output so I can use that to calculate % Contribution to Total

The syntax I am using :

sum({<

Product_Description={"=

rank(sum({<Time_Groups_Total={'MAT Rolling Folder'},Sub_Category={'Formula'},Groups - ={'S Group'},Trans_Month={'$(vMaxMonth)'}>}$(vMeasure)))<=10"}>}$(vMeasure))

The problem is I am getting a incorrect answer . I think it might be something to do with my Trans Month because the value output seems triplicated . 

What am I missing ? Can you advise

Labels (1)
1 Solution

Accepted Solutions
TauseefKhan
Creator III
Creator III

Check this one:

Sum(
{<
Product_Description = {"=Rank(Sum({<Time_Groups_Total={'MAT Rolling Folder'}, Sub_Category={'Formula'}, Groups - ={'S Group'}, Trans_Month={'$(vMaxMonth)'}>} $(vMeasure))) <= 10"},
Time_Groups_Total = {'MAT Rolling Folder'},
Sub_Category = {'Formula'},
Groups - = {'S Group'},
Trans_Month = {'$(vMaxMonth)'}
>} $(vMeasure)
)

*****Hope this will help you to resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.******

View solution in original post

2 Replies
TauseefKhan
Creator III
Creator III

Check this one:

Sum(
{<
Product_Description = {"=Rank(Sum({<Time_Groups_Total={'MAT Rolling Folder'}, Sub_Category={'Formula'}, Groups - ={'S Group'}, Trans_Month={'$(vMaxMonth)'}>} $(vMeasure))) <= 10"},
Time_Groups_Total = {'MAT Rolling Folder'},
Sub_Category = {'Formula'},
Groups - = {'S Group'},
Trans_Month = {'$(vMaxMonth)'}
>} $(vMeasure)
)

*****Hope this will help you to resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.******

george456
Creator
Creator
Author

Hi Thanks. I get it now. I see what my error was . Appreciate your assistance/guidance