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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Awoodfor
Frequent Visitor

Looking for DAX Help for a Count of Orders After Event Order Date

Hello All,

 

I am looking to get a count of orders by account. I have an example of the columns i have below. 

 

More specificly im looking for a formula that would look at each account  and give me a count of orders after the order a specific event. 

 

AccountOrderKeyEvent IDEvent DateOrder Date
abc1551111/1/20211/1/2021
abc2561124/1/20213/25/2021
abc3571124/1/20212/10/2021
abc1581124/1/20211/6/2021
abc2591111/1/202110/10/2021
abc36011310/1/20212/10/2021
abc16111310/1/20211/25/2021
abc16111411/1/20211/25/2021

 

So if i use a event id slicer and select Event ID "111"  the account abc1 would return the following 

 

 Slicer : Event ID 111
Account Count of orders 
abc13
abc2 0

 

Ive been racking my brain for a formula for quite a while and am just looking for a bit of guidence, 

Thank you for any help.

 

Adam

1 ACCEPTED SOLUTION
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1640893531881.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

6 REPLIES 6
CNENFRNL
Community Champion
Community Champion

CNENFRNL_0-1640893531881.png

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thank you very much for your help this worked for me!

bcdobbs
Community Champion
Community Champion

Are the event ids always in chronological order?



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

No they are not.  

bcdobbs
Community Champion
Community Champion

No problem can you explain a little more about why abc2 would have a count of zero? Think I'm missing something!



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Of course, so abc 2 only purchased EventID 111  and did not purchase any other Event after that. 

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.