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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
saurabhsahu0111
New Member

Calculate total count by today's date

Hello Group Members, I am stuck in a situation where I have to findout: 1-Number of open issues as of today's date (Including past dated item if open) 2-Number of open issues after today's date.

 

Please assist. Thank you.

 

Ticket             Status      Last Date to close

XXX                  Closed      04-09-2020

ABC                 Open         01-09-2020

DFG                 Open        31-08-2020

GHJ                 Closed      01-09-2020

FHT                 Open        10-09-2020

FGH                 Open       15-09-2020

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@saurabhsahu0111 , Try like

calculate(countrows(Table), filter(Table, (table[Status] ="Open" && [Last Date to close] =<today()) || (table[Status] ="Closed" && [Last Date to close] >today())))

 

or

calculate(countrows(Table), filter(Table, (table[Status] ="Open" && [Last Date to close] <today())))

 

or

calculate(countrows(Table), filter(Table, (table[Status] ="Open" && [Last Date to close] <= today())))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Greg_Deckler
Super User
Super User

@saurabhsahu0111 - Seems like:

 

Measure 1 = COUNTROWS(FILTER('Table',[Status]="Open" && [Last Date to Close] <= TODAY())

Measure 2 = COUNTROWS(FILTER('Table',[Status]="Open" && [Last Date to Close] > TODAY())

 

I feel like I am missing something. 

 

You may find this handy - 
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @saurabhsahu0111 

 

If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!

If not, please kindly elaborate more.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Greg_Deckler
Super User
Super User

@saurabhsahu0111 - Seems like:

 

Measure 1 = COUNTROWS(FILTER('Table',[Status]="Open" && [Last Date to Close] <= TODAY())

Measure 2 = COUNTROWS(FILTER('Table',[Status]="Open" && [Last Date to Close] > TODAY())

 

I feel like I am missing something. 

 

You may find this handy - 
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@saurabhsahu0111 , Try like

calculate(countrows(Table), filter(Table, (table[Status] ="Open" && [Last Date to close] =<today()) || (table[Status] ="Closed" && [Last Date to close] >today())))

 

or

calculate(countrows(Table), filter(Table, (table[Status] ="Open" && [Last Date to close] <today())))

 

or

calculate(countrows(Table), filter(Table, (table[Status] ="Open" && [Last Date to close] <= today())))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks @amitchandak for the resolution, it's working.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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