cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

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 Smiley Happy
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

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/

srlabhe123 Member
Member

Re: Ranking Without any aggregate expression

Thanks Zubair

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 380 members 3,495 guests
Please welcome our newest community members: