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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Shubham_joshi1
Regular Visitor

Yesterdays count find

Hello All,

 

how to find yersterday's count for below table :

 

 

for your reference data nature is like  in the below table yesterday's count should be 2 for date 1/6/2023 as previous date 1/8/2023 is not available . so how to find the yerterdays count ? please help me

date of registration Registration count 
1/5/20232
1/6/20232
1/9/20231
1 REPLY 1
JoBI
Resolver II
Resolver II

Hello,

 

You can use the following measure:

 

Yesterdays Count = 
Var __last_date = CALCULATE(MAX('Table'[date of registration ]))
Var __yesterday = CALCULATE(MAX('Table'[date of registration ]), 'Table'[date of registration ] < __last_date)
Return
CALCULATE(SUM('Table'[Registration count ]), 'Table'[date of registration ] = __yesterday)

 

 

 

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors