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 for new Measure to calculate rows where status = Open and Past deadline

Hi

 

 I would like to create a filter or a new measure which will provide the count of Total rows where Status = Open and date in Deadline column = before today's date. Can you please help me write a query for this?

 

I created a visual Card which currently has total count of rows. I was thinking I would add a New Measure on top of this.

 

many thanks,

 

 

7 REPLIES 7
parry2k
Super User
Super User

@Anonymous add a measure something like this

 

Total Open Order Before Today = 
CALCULATE( 
COUNT( Table[Order Number], 
Table[Status] = "Open", 
Table[Order Date] < TODAY() 
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

 

Past Deadline Erro.PNG

 

@Anonymous you didn't gave the column name to count and I also missed a bracket.

 

Total Open Order Before Today = 
CALCULATE( 
COUNT( Table[Order Number]), 
Table[Status] = "Open", 
Table[Order Date] < TODAY() 
)


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi,

 

When I was typing, the "Table [Order Number]" was not an option and I had to manually enter it and then recieved the error below.

 

I did from the rejection, go back and update the Table [Order Number] to  be the actual name of my table and used the ID column as that is the column we use to keep "count".  I didn't recieve an error but the data did not update as it should. Is there somthing I need to clean up in the data soruce?

 

DAX rejection.PNG

@Anonymous yes you need to change column name and table name as per your data model. Since you fixed that, what is the issue? Are you getting wrong result?

 

I think at this point it will make sense if you can share some sample data using one drive/google drive. Remove any sensitive information before sharing.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi,

 

Thank you for your response. I think I am al ltogether trying the wrong command.

 

Let me re-explain myself: I need to find the rows (ID #s) where the status is open and it is past their deadline. So I am thinkning:

 

Count Governance [ID] , Governance [Status] = "Open", Governance [Deadline] < Today.

^^ Laymen terms I am trying to ask it to count the ID's where the status is currently open but we are past the deadline date.

Hey @Anonymous so what is the issue with the expression I sent to you.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.