Forum Discussion
Parameter ASC or DESC
- 1 year ago
Hi Anonymous,
Thank you for reaching out to the Microsoft fabric community forum. Thank you adudani, brsamyrmoises, 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.
Hi Anonymous,
Thank you for reaching out to the Microsoft fabric community forum. Thank you adudani, brsamyrmoises, 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.
Hi Anonymous,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.