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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Pavlous
Advocate II
Advocate II

Custom Table: Continuous Record

Hi,

I have to made a new table, but I am really terrible at those custom tables. Lets say, that I want to track life cycle of projects. So I need to have listed all items with all months in which they live. But from the source I have only time stamps.

ProjectStatusDate of Implementation
NRG-1A01/01/2018
NRG-1B01/03/2018
NRG-1C01/05/2018
NRG-2A01/02/2018
NRG-2B01/03/2018
NRG-2C25/03/2018
NRG-1D12/12/2018
NRG-1E01/01/2019
NRG-2C03/05/2018
NRG-2D20/12/2018
NRG-3A01/01/2018
NRG-3B20/01/2018
NRG-3C22/01/2018
NRG-3D05/02/2018
NRG-3E06/03/2018

And I need to return values with all the statuses until they changed

ProjectStatusMonth
NRG-1AJan-18
NRG-3AJan-18
NRG-3BJan-18
NRG-3CJan-18
NRG-2AFeb-18
NRG-3DFeb-18
NRG-1AFeb-18
NRG-1BMar-18
NRG-2BMar-18
NRG-3EMar-18
NRG-2CMar-18
NRG-1BApr-18
NRG-2CApr-18
NRG-3EApr-18
.........

 

Any help appreciated

2 REPLIES 2
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@Pavlous,

I am not very clear about the logic you use to create the second table based on the first table. Could you please explain more about it? For example, how do you get the following record in the second table? 

NRG-1 A Feb-18



Regards,
Lydia

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

Hi @v-yuezhe-msft,

thank you for your reply.

 

Thats something I would like to do within the custom table. So it should be the result based on datas from the first data.

 

In other words, I need to "fill" all months between time stamps per project and with the status until its changed.

 

I am sure, its doable, as I have similiar function for other solution. Unfortunatelly I cant replicate it for this one, as I forgot the logic of it 😕

Result = 

VAR calendar_date =
    CALENDAR (
        CALCULATE ( FIRSTDATE (Archive[Received Date]), **filter** ),
        CALCULATE (  LASTDATE('CAS Tasks'[EndTime]), **filter** ))
		//^^ this part takes first and last relevant date 
    
VAR filted =
    FILTER ( ALL ( 'CAS Tasks' ), [Category] = **filter**)  
VAR filted2= FILTER(ALL('Archive'),[Categories] = **filter** )
RETURN
ADDCOLUMNS ( calendar_date, "Total", (SUMX ( FILTER ( ADDCOLUMNS ( filted, "Exist", CONTAINS ( SELECTCOLUMNS ( CALENDAR ( [Received Date], 'CAS Tasks'[EndTime] ), "CheckDate", [Date] ), [CheckDate], [Date] ) ), [Exist] = TRUE () ), 'CAS Tasks'[To process corr.] ))+ ( SUMX ( FILTER ( ADDCOLUMNS ( filted2, "Exist2", CONTAINS ( SELECTCOLUMNS ( CALENDAR ( [Received Date], [End Time] ), "CheckDate2", [Date] ), [CheckDate2], [Date] ) ), [Exist2] = TRUE () ), Archive[To process corr.] ) ) )

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 MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.