cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
srlabhe123 Member
Member

Ranking Without any aggregate expression

Hi Power BI Gurus,

I have below set of data 

 

Customer IdCalendar DateSale IdStanding Order Id
12314-NOV-13 00:00:001526471765911674594922
12305-DEC-13 00:00:001528509907011674594922
12316-DEC-13 00:00:001529203629411674594922
12303-JAN-14 00:00:001530180301715474692288
12317-JAN-14 00:00:001531266056615474692288
12331-JAN-14 00:00:001532469647915474692288
12314-FEB-14 00:00:001533759277715474692288
12328-FEB-14 00:00:001534917049415474692288
12314-MAR-14 00:00:001536146173815474692288

 

 

Now I want an additionla column say SO Instance with value like below, its almost ranking Customer on the base of its SO ID ,Sale ID and Calendar Date

 

Customer IdCalendar DateSale IdStanding Order IdSO Instance
12314-NOV-13 00:00:0015264717659116745949221
12305-DEC-13 00:00:0015285099070116745949222
12316-DEC-13 00:00:0015292036294116745949223
12303-JAN-14 00:00:0015301803017154746922881
12317-JAN-14 00:00:0015312660566154746922882
12331-JAN-14 00:00:0015324696479154746922883
12314-FEB-14 00:00:0015337592777154746922884
12328-FEB-14 00:00:0015349170494154746922885
12314-MAR-14 00:00:0015361461738154746922886

 

The data has mumtiple customer IDs with respective Sae and SO IDs.

 

Appreciate yor help in this.

 

Thanks

Swapnil

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Ranking Without any aggregate expression

Hi @srlabhe123

 

Try this calculated column

What is the role of Sale ID in RANKING?

 

SO_Instance =
RANKX (
    FILTER (
        ALL ( TableName ),
        TableName[Customer Id] = EARLIER ( TableName[Customer Id] )
            && TableName[Standing Order Id] = EARLIER ( TableName[Standing Order Id] )
    ),
    TableName[Calendar Date],
    ,
    Asc,
    DENSE
)

25.png

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Ranking Without any aggregate expression

check this post






Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Super User
Super User

Re: Ranking Without any aggregate expression

Hi @srlabhe123

 

Try this calculated column

What is the role of Sale ID in RANKING?

 

SO_Instance =
RANKX (
    FILTER (
        ALL ( TableName ),
        TableName[Customer Id] = EARLIER ( TableName[Customer Id] )
            && TableName[Standing Order Id] = EARLIER ( TableName[Standing Order Id] )
    ),
    TableName[Calendar Date],
    ,
    Asc,
    DENSE
)

25.png

View solution in original post

srlabhe123 Member
Member

Re: Ranking Without any aggregate expression

Great it worked like charm... but not surehow ?

May I have to read more article about Earlier...do you have any that explains in detail

 

Thanks

Swapnil

Super User
Super User

Re: Ranking Without any aggregate expression

Hi @srlabhe123

 

This was a little web post I wrote on EARLIER few months back

 

http://www.excelnaccess.com/earlier-in-dax/

Highlighted
srlabhe123 Member
Member

Re: Ranking Without any aggregate expression

Thanks Zubair

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 274 members 2,227 guests
Please welcome our newest community members: