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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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())))

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!:
The Definitive Guide to Power Query (M)

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!:
The Definitive Guide to Power Query (M)

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())))

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.