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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SushmaReddy
Helper I
Helper I

Processed record count for selected date

Hi Team,

I have to display the processed record count(Success) on selecting a date from the fiter.

For suppose on day 12-06-22 i have 20 failed records and on 13-06-22, 9 got success and 11 got failed.

I need to display 9 on selecting 13-06-22, Likewise for all dates.Thank you in advance...

 

Best Regards,

Sushma

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @SushmaReddy 

 

Suppose you only need to count those "success" ones whose status is "fail" in previous date and do not need to count any new "fail" ones in the selected date. Suppose your dates are continuous in the table. You can use the following measure to count the result. 

SwitchToSuccess Count = 
var previousFailed = CALCULATETABLE(VALUES('Table (2)'[Product]), 'Table (2)'[Status] = "Failed", PREVIOUSDAY('Table (2)'[Date]))
var switchToSuccess = CALCULATETABLE(VALUES('Table (2)'[Product]), 'Table (2)'[Status] = "Success", 'Table (2)'[Product] IN previousFailed)
return
COUNTROWS(switchToSuccess)

vjingzhang_0-1657795324236.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @SushmaReddy 

 

Suppose you only need to count those "success" ones whose status is "fail" in previous date and do not need to count any new "fail" ones in the selected date. Suppose your dates are continuous in the table. You can use the following measure to count the result. 

SwitchToSuccess Count = 
var previousFailed = CALCULATETABLE(VALUES('Table (2)'[Product]), 'Table (2)'[Status] = "Failed", PREVIOUSDAY('Table (2)'[Date]))
var switchToSuccess = CALCULATETABLE(VALUES('Table (2)'[Product]), 'Table (2)'[Status] = "Success", 'Table (2)'[Product] IN previousFailed)
return
COUNTROWS(switchToSuccess)

vjingzhang_0-1657795324236.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

ribisht17
Super User
Super User

@SushmaReddy 

 

Please share the data,

It should be like

 

Solution=

CALCULATE(COUNTROWS(orders_),ALLSELECTED('Calendar Table'[Date]),'Count'[Status]="SUCCESS")
My Table Name=Order_
Status is similar to your table which shows Failed records, I hope there is a column there
 
Regards,
Ritesh

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.