Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Parameter ASC or DESC

I've created parameter taken from data table column i.e. Year, Quarter and those parameter I am using as Slicer.   then I created Line chart using parameter as X Axis. line chart 3 dot option i cha...
  • v-kpoloju-msft's avatar
    1 year ago

    Hi Anonymous,
    Thank you for reaching out to the Microsoft fabric community forum. Thank you adudanibrsamyrmoises, for your inputs on this issue.

    After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.

    Create Date Parameter Dax:

    DateParameter =

    DATATABLE(

        "Year", INTEGER,

        "Quarter", STRING,

        "YearQuarter", STRING,

        "SortOrder", INTEGER,

        {

            {2023, "Q1", "2023 Q1", 202301},

            {2023, "Q2", "2023 Q2", 202302},

            {2023, "Q3", "2023 Q3", 202303},

            {2023, "Q4", "2023 Q4", 202304},

            {2024, "Q1", "2024 Q1", 202401},

            {2024, "Q2", "2024 Q2", 202402}

        }

    )

    Create Sales Data Dax:
    SalesData =

    DATATABLE(

        "YearQuarter", STRING,

        "Sales", INTEGER,

        {

            {"2023 Q1", 100},

            {"2023 Q2", 150},

            {"2023 Q3", 130},

            {"2023 Q4", 180},

            {"2024 Q1", 160},

            {"2024 Q2", 200}

        }

    )

     

    Relationship should be for both tables – Many to One Relationship:

    To adjust the x-axis values, please select either the sort ascending or sort descending option.

    I am also including .pbix file for your better understanding, please have a look into it:

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

    Thank you for using Microsoft Community Forum.