Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Convert start and end dates to continuous range

I have the following table: What is the best way to turn the Start and End columns into a date continuum so that you can easily graph the consumption and amounts per day? Greetings a...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi Syndicate_Admin ,

    According to your description, I create a sample.

    Here's my solution.

    1.Create a Date table, don't make relationship between the two tables.

    Date = CALENDARAUTO()

    2.Create two measures.

    Consumption Measure =
    MAXX (
        FILTER (
            'Table',
            MAX ( 'Date'[Date] ) >= 'Table'[Start]
                && MAX ( 'Date'[Date] ) <= 'Table'[End]
        ),
        'Table'[Consumption]
    )
    
    Importe Measure =
    MAXX (
        FILTER (
            'Table',
            MAX ( 'Date'[Date] ) >= 'Table'[Start]
                && MAX ( 'Date'[Date] ) <= 'Table'[End]
        ),
        'Table'[Importe]
    )
    

    Put Date from Date table in X-axis, Concept in Legend and measure in Y-axis, get the result.

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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