Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to create sub table based on other table

Hi, 

I am syncrhonizing data from VSTS (Azure Devops) - Analytics View. 

 

I want to create a table based on last 30 days historical table which I fetch from Analytics plugin. 

 

I was able to build an iteration paths table by simply using: 

Interations Dim = DISTINCT('Work Items - Last 30 days'[Iteration Path])
However I would like to build a table, which consists of:
  • Distinct name of iteration path
  • Iteration start date
  • Iteration end date

I tried with summarize, but the problem is that there might be multiple values..

 

Ideally I would like to have a table based on dates in a range.

Date Range = CALENDAR(DATE(2019;01;01); DATE(2020;12;31))
which includes those fields above...
To be more precise, here are the data I need to transform...
 
Current table       
Iteration PathIteration Start DateIteration End DateTitleDate Effort completedEffort remaining
Iteration 101/01/201907/01/2019Task 102/01/2019 15
Iteration 101/01/201907/01/2019Task 202/01/2019 23
Iteration 101/01/201907/01/2019Task 104/01/2019 52
Iteration 101/01/201907/01/2019Task 204/01/2019 34
Iteration 101/01/201907/01/2019Task 305/01/2019 45
Iteration 208/01/201915/01/2019Task 608/01/2019 15
Iteration 208/01/201915/01/2019Task 408/01/2019 23
Iteration 208/01/201915/01/2019Task 808/01/2019 52
Iteration 208/01/201915/01/2019Task 910/01/2019 34
Iteration 208/01/201915/01/2019Task 910/01/2019 45
Iteration 316/01/201923/01/2019Task 1116/01/2019 15
Iteration 316/01/201923/01/2019Task 1216/01/2019 23
        
Target table       
Date Iteration Start DateIteration End Date    
01/01/2019Iteration 101/01/201907/01/2019    
02/01/2019Iteration 101/01/201907/01/2019    
03/01/2019Iteration 101/01/201907/01/2019    
04/01/2019Iteration 101/01/201907/01/2019    
05/01/2019Iteration 101/01/201907/01/2019    
06/01/2019Iteration 101/01/201907/01/2019    
07/01/2019Iteration 101/01/201907/01/2019    
08/01/2019Iteration 208/01/201915/01/2019    
09/01/2019Iteration 208/01/201915/01/2019    
10/01/2019Iteration 208/01/201915/01/2019    
11/01/2019Iteration 208/01/201915/01/2019    
12/01/2019Iteration 208/01/201915/01/2019    
13/01/2019Iteration 208/01/201915/01/2019    
14/01/2019Iteration 208/01/201915/01/2019    
15/01/2019Iteration 208/01/201915/01/2019    
16/01/2019Iteration 316/01/201923/01/2019    
 
Any support is greatly appreciated
All the best
Marcin 
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous ,

    You can try to use following calculate table formula to create a expand table with all detail date records:

    New Table =
    VAR _calendar =
        CALENDAR (
            MIN ( Table[Iteration Start Date] ),
            MAX ( Table[Iteration End Date] )
        )
    RETURN
        FILTER (
            CROSSJOIN (
                SUMMARIZE ( Table, [Path], [Iteration Start Date], [Iteration End Date] ),
                _calendar
            ),
            [Date] >= [Iteration Start Date]
                && [Date] <= [Iteration End Date]
        )
    

    Regards,

    Xiaoxin Sheng

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    You can try to use following calculate table formula to create a expand table with all detail date records:

    New Table =
    VAR _calendar =
        CALENDAR (
            MIN ( Table[Iteration Start Date] ),
            MAX ( Table[Iteration End Date] )
        )
    RETURN
        FILTER (
            CROSSJOIN (
                SUMMARIZE ( Table, [Path], [Iteration Start Date], [Iteration End Date] ),
                _calendar
            ),
            [Date] >= [Iteration Start Date]
                && [Date] <= [Iteration End Date]
        )
    

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for help Anonymous ! This is exactly what I needed.