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
Anonymous
Not applicable

Retrieve the first date of the item's dissapearence

 

Hi,

 

I have the below table for which I would like to retrieve in a different column, the first date when the items were missing.  The missing date should be retrieved only in the next row of the missing date, for which I have added the comments.

 

Many thanks for your support,

Melissa

 

ItemDateComments
1454402/10/2020 
1454402/13/2020retrieve 02/11/2020 - the first date when the item was missing
1454402/14/2020 
1454402/16/2020do not retrieve 02/15/2020 - is not the first dissapearence of the item
1462202/13/2020 
1462202/15/2020retrieve 02/14/2020 - the first date when the item was missing
1462202/17/2020do not retrieve 02/16/2020 - is not the first dissapearence of the item
1462202/19/2020do not retrieve 02/18/2020 - is not the first dissapearence of the item
   
2 ACCEPTED SOLUTIONS

Hi @Anonymous ,

 

Sorry i don't quite understand what you meaning "retrieve the next day of the first occurrence".

You want each row show mindate+1?

9.PNG

Or you want show mindate+1 when an item is appearing only once?

8.PNG

If i misunderstand your meaning, please show me what's the expected out put you want.

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

Anonymous
Not applicable

Hi @Anonymous 

 

I think you might encounter some issues if it not always the second day which is missing. If so then you can tweek @v-jayw-msft 's great solution like below:

Column = 
var mindate = CALCULATE(MIN('Fact'[Date]);ALLEXCEPT('fact';'fact'[Item]))
var maxdate = MAX( TODAY(); CALCULATE(MAX('Fact'[Date]);ALLEXCEPT('fact';'fact'[Item])))

return
MINX(
    FILTER(
        ALL('Calendar');
        'Calendar'[Date] in DATESBETWEEN( 'Calendar'[Date]; mindate; maxdate) && NOT('Calendar'[Date] IN CALCULATETABLE( SELECTCOLUMNS( 'Fact'; "Date"; 'Fact'[Date]); ALLEXCEPT( 'Fact'; 'Fact'[Item])))
    );
    'Calendar'[Date]
)

 

test1.PNG

 

Kudos is highly appreciated.

View solution in original post

10 REPLIES 10

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.