Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Creating Trend graphs for Weekly Data

Hi, I am new in Power BI and trying to create a Weekly trand Graph for our IT team .. Sample data is as follows:   ID Status Creation Date Last Modified 44441 Fixed 5-Feb-20 6-Feb-20 ...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous,

    You can check the following steps if they suitable for your requirements.

    Steps:

    1. Create a expand table based on id and its date ranges.

    Expand = 
    SELECTCOLUMNS (
        FILTER (
            CROSSJOIN (
                Test,
                CALENDAR ( MIN ( Test[Creation Date] ), MAX ( Test[Last Modified] ) )
            ),
            [Date] >= [Creation Date]
                && [Date] <= [Last Modified]
        ),
        "ID", [ID],
        "Date", [Date]
    )
    

    2. Build a relationship from expand table to original table based on id field with 'both' direction mode.

    3. Create a line chart with expand table date as axis, original table 'status' as legend and 'id' as value. (If you need a trend line, you can enable it in the analysis panel trend option.)

    4. Create a slicer with status fields to choose display records.

    Snapshot:

     

    BTW, I also attached the sample file below.

    Regards,

    Xiaoxin Sheng