BookmarkSubscribeRSS Feed
mikesatriaevo
Fluorite | Level 6

Hi SAS Expert,

I would like to create a calculated member in SAS OLAP to perform ranking. Following is the desired result as attached (MDX.jpg)

Mis Month

Category

Sales Amt

Ranking

Apr-13

Grocery

9999

1

Apr-13

Electronic

5000

2

May-13

Grocery

6213

2

May-13

Beverage

2012

3

May-13

Electronic

8782

1

Jun-13

Beverage

5000

1

I found a similar solution at http://social.msdn.microsoft.com/Forums/sqlserver/en-US/050a18f3-dac6-4e3a-bf00-d92319b88714/mdx-ran...

But it is using Microsoft platform and the syntax/ function is not available in SAS, i.e. nonempty function is not available

Can you please advise how to achieve this in SAS mdx?

Thank you.

Regards,

Mike


MDX.jpg
1 REPLY 1
RichardinOz
Quartz | Level 8

Have you investigated Proc Rank?  It is designed to do this job for you.

Richard

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 412 views
  • 0 likes
  • 2 in conversation