Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting order

Hi All ,

I just want to show below sorting order in below application (piovt table ), can any help me out on this?

below is the attached file

  • Gross Sales--1
  • Good returns--2
  • Bad returns--3
  • Discounts--4
  • Free goods --5
  • Invoiced Sales--6
  • Rebates -7
  • Net Sales-8
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

below is the correct one

Thank you guys for trying

if([Level 1] = 'Gross Sales',1,  if([Level 1] = 'Good Returns',2,  if([Level 1] = 'Bad Returns',3,  if([Level 1] = 'Discount',4,   

if([Level 1] = 'Free goods',5,  if([Level 1] = 'Invoiced Sales',6,   if(Upper(Trim([Level 1])) ='Rebates ',7,  

if(lower([Level 1]) ='Net Sales',8,9998))))))))

View solution in original post

7 Replies
Gysbert_Wassenaar

You can determine the load order in the script by first loading the values in the order you want:

TempLevel1;

LOAD * INLINE [

Level 1

Gross Sales

Good returns

Bad returns

Discounts

Free goods

Invoiced Sales

Rebates

Net Sales

];

[P&L Hier1]:

LOAD ACCN_INSIGHT_CD,
    
[Level 1],
    
[Level 2],
    
[Level 3],
    
[Level 4],
    
[Level 5],
    
[Level 6]
FROM
     [ ..\4.Mart\P&L Hier1.xls]
     (
biff, embedded labels, table is Sheet1$)

     ;

DROP TABLE TempLevel1;

You can then sort Level 1 by Load Order in your pivot table.


talk is cheap, supply exceeds demand
alexandros17
Partner - Champion III
Partner - Champion III

Take a look at this:

Anonymous
Not applicable
Author

Hi,

It's not showing correct order..

Gysbert_Wassenaar

You mean in that monster pivot table CH396 on the sheet Direct Sales Vs Indirect Sales? If you want that monster sorted by Level 1 first and then the other dimensions then you need to move that field to the left most position in the pivot table.



talk is cheap, supply exceeds demand
Anil_Babu_Samineni

Like this..

=match([Level 1],'Gross Sales','Good returns','Bad returns','Discounts','Free goods','Invoiced Sales','Rebates','Net Sales')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

below is the correct one

Thank you guys for trying

if([Level 1] = 'Gross Sales',1,  if([Level 1] = 'Good Returns',2,  if([Level 1] = 'Bad Returns',3,  if([Level 1] = 'Discount',4,   

if([Level 1] = 'Free goods',5,  if([Level 1] = 'Invoiced Sales',6,   if(Upper(Trim([Level 1])) ='Rebates ',7,  

if(lower([Level 1]) ='Net Sales',8,9998))))))))

Anil_Babu_Samineni

Time G_D..

If possible, Please share me that Qvw file / Let me know where do you paste this code...

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful