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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mhng
Regular Visitor

How to return status of previous record if there is no data found in the period chosen

Hi,

In my model, I have two table, one fact and one date not linking. The date table is meant to provide a continuity report such that even though there is not record, it should show distinct count of ID as 1 if the status remains O or R.

 

My challenge is to figure out how to include this count when there is no transaction.

 

For example, if user picked 2015 October to November, it should still show 1 because the status for previous record "2015-09-22" is "O"  (O=Open,F=Final, R=Reopen)

 

iddatestatus
1512342015-09-22O
1512342015-09-22O
1512342015-12-04O
1512342015-12-18O
1512342016-09-02O
1512342016-11-29O
1512342016-12-21O
1512342018-10-16O
1512342018-10-16O
1512342018-10-22O
1512342018-10-31O
1512342018-11-30O
1512342019-01-21O
1512342019-01-21O
1512342019-01-21O
1512342019-01-21O
1512342019-01-21F
1512342019-01-31R
1512342019-03-14F

 

Thanks for your attention and any help would be appreciated!!!

 

Cheers, Michelle

1 REPLY 1
amitchandak
Super User
Super User

Please refer

https://community.powerbi.com/t5/Desktop/get-value-from-Previous-row/td-p/441336

https://community.powerbi.com/t5/Desktop/Reference-previous-row-to-get-value/td-p/154824

https://community.powerbi.com/t5/Desktop/Get-previous-row-value-in-new-column/td-p/496182

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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