Forum Discussion

Samwise23's avatar
Samwise23
Frequent Visitor
2 years ago
Solved

Create Custom Table with Dynamic Month-Year As Column Names (column headers)

Hello everyone,   I would like to achieve the following table format:   - The measures are calculated from different tables that are not connected to each other (no relationship). - Th...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  Samwise23 ,

    I created some data:

    Power BI's default sorting is alphabetical, so the following will happen, you can create a new table to join and use the columns of the new table for sorting

    Here are the steps you can follow:

    1. Create calculated table.

    Table 2 =
    SUMMARIZE(
        'Table','Table'[month_year],"mindate",
        MINX(FILTER(ALL('Table'),
        'Table'[month_year]=EARLIER('Table'[month_year])),[Date]))

    Select[month_year] – Column tools – Sort by column – [mindate]

    2. Connecting the relationship between two tables.

    3. Result:

     

     

    Best Regards,

    Liu Yang

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