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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

To display the customers in straight table

Dear QV Experts,

Dataset: 2014-15 which retrieves the customer whose sales value for both the years.

In Expression, If Suppress when value is null unchecked, then displaying the values correctly.

But while selecting Top5 or 10, then 6th or 11th row displayed. Due to that the Expression Sum also displays incorrect.

Can anyone suggest. We need to display the null values also but while filtering based on Top5,10,20 still the null shouldnt be displayed.

Appreciate your prompt response.

Thanks,

Sasi

7 Replies
sunny_talwar

Would you be able to share a sample?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Disable the Show Others option and set the Total Mode to Sum of Rows.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Sasi,

Share some sample data or example on what is required.

Regards,

Anjali Gupta

Not applicable
Author

Dear QV Experts,

Please find the example attached.

  THe input data,

CustomerNameYearSales
ABC20151000
ABC2014750
ABC2013675
BCD20151100
BCD2014600
BCD2013640
CDE20151250
CDE2014800
CDE2013750
DEF2015900
DEF2014400
DEF2013500
EFG2013300

The customer EFG having Sales only in 2013.

Can anyone suggest. We need to display the null values also but while filtering based on Top5,10,20 still the null shouldnt be displayed.

In the Suppress Null Straight Table, if i select the maximum number of rows to display, i am not seeing the Customer EFG [Reason being no sales in the Year 2014,2015]

In the Suppress Not Null Straight Table, if i select only one row to be displayed, still the customer EFG with - displaying.

The requirement is.

If i select 3 rows, the top3 rows should be displayed.

If i select 5 rows, the Top5 rows including Customer EFG should be displayed in the straight table.

Appreciate your prompt response.

Thanks,

Sasi

sunny_talwar

Try this as your calculated dimension:

=If(Aggr(Rank(RangeSum(Sum(Sales), Sum({<CustomerName = e(CustomerName), Year>} 0))) <= vTopX, CustomerName), CustomerName)

Capture.PNG

Not applicable
Author

Thanks Sunny. Fantastic.

One more request, Can you please help me in the below calculated dimension.

=if(%Ranking_No='1', aggr(if(rank(Sum({$}{<[Year]={$(VCurrentYear)},Date={'<=$(vMaxInvoiceDate)'}>}Sales))<=vTopX,CustomerName),CustomerName),
if(%Ranking_No='2',aggr(if(rank((Sum({<[Year]={$(VCurrentYear)}>}Sales) - Sum({<[Year]={$(=(VCurrentYear)-1)},Date={'<=$(vAsOfDatePY)'}>}Sales) ))<=vTopX,CustomerName),CustomerName),
if(%Ranking_No='3',aggr(if(rank((Sum({<[Year]={$(VCurrentYear)}>}Sales)  - Sum({<[Year]={$(VCurrentYear)}>}PlannedSalesAmtYTD) ))<=vTopX,CustomerName),CustomerName),
if(%Ranking_No='4',aggr(if(rank(-(Sum({<[Year]={$(VCurrentYear)}>}Sales)  - Sum({<[Year]={$(=(VCurrentYear)-1)},Date={'<=$(vAsOfDatePY)'}>}Sales) ))<=vTopX,CustomerName),CustomerName),
if(%Ranking_No='5',aggr(if(rank(-(Sum({<[Year]={$(VCurrentYear)}>}Sales)  - Sum({<[Year]={$(VCurrentYear)}>}PlannedSalesAmtYTD) ))<=vTopX,CustomerName),CustomerName),
if(%Ranking_No='6',aggr(if(rank(num(((Sum({<[Year]={$(VCurrentYear)}>}Sales) - Sum({<[Year]={$(=(VCurrentYear)-1)},Date={'<=$(vAsOfDatePY)'}>}Sales))
/
Sum({<[Year]={$(=(VCurrentYear)-1)},Date={'<=$(vAsOfDatePY)'}>}Sales)),'#,##0%'))<=vTopX,CustomerName),CustomerName)
))))))


Thanks a lot!!!


sunny_talwar

Hi Sasi -

I suggest closing this thread down and creating another thread to start a discussion for this calculated dimension. You need to tell us what isn't working and probably share a sample like you just did for the issue we resolved.

Best,

Sunny