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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

DAX find date when order count exceeded value

I need to find the date when we had 4000 orders so far in a month. Each row is an order. 

 

For example, my data is

Screen Shot 2019-01-15 at 2.57.16 PM.png

 

Each month, I need to return the date that contains the 4000th occurance that month. 

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

Can you share sample data in an MS Excel file.  Share the link from where i can download that Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
AlB
Community Champion
Community Champion

Hi @Anonymous

 

Is there an index column or anything else that differentiates rows with the same date? 

I think you could try somethig like this:

1. Create a Date table and a relationship with your data table. 

2. Place Date[Month] in the rows of a matrix visual

3. Place this measure in values:

 

 

NthSaleDate =
VAR _N = 4000 //Change this if your want to find an occurrence other than 4000th
RETURN
    FIRSTNONBLANK (
        SELECTCOLUMNS (
            FILTER (
                ADDCOLUMNS (
                    VALUES ( Table1[Date] ),
                    "CountUpToCurrentRow", COUNTROWS ( FILTER ( Table1, Table1[Date] <= EARLIER ( Table1[Date] ) ) )
                ),
                [CountUpToCurrentRow] >= _N
            ),
            "Date", [Date]
        ),
        1
    )

 

Anonymous
Not applicable

Thank you! 

 

Is there a way to make a calculated column to show if each order is under the volume limit for the month? Ie if an order was placed before Dec 17th it would be under limit and after Dec 17th it would be over limit? 

@Anonymous you could use an if statement assuming you have the volumes already

 

limitstatus = if(orderVolume < volumeLimit,"under limit", "over limit")





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Hi  @vanessafvg ,

 

I don't have the volumes already, unfortunately which is the problem. I would need to find if a certain row/order was under the 4000th that month, then it would be under volume. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.