Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I created a calculated table with two values, 'Yes' and 'No', to be used in a slicer. I have a table called 'ATL' with a column named 'orderDate' that contains product order dates. I would like to sort the 'ATL' table in ascending order by the 'orderDate' column when 'Yes' is selected from the previously created slicer.
Could anyone assist me with achieving this?
Thank You.
Solved! Go to Solution.
Here is my Approach to it :
Step 1 - I created two date tables One with dates sorted in Asc order, another one with Dates sorted in Desc Order.
Step 2 - create a relationship between Date Column of these date tables with the Date column in Fact table . In your Case ATL table ( order Date Column )
Step 3 - Create a Field parameter, add date Columns from both date tables ( that we created in step 1)
Step 4 - in the Dax of field Parameters, also add another column Values "Yes" and "NO", - these will be used to build a relationship with your calculated table that you are using as a slicer. Alternatively you can use this column as a slicer itself
In the following code you can see how to add the Yes and No , to create a new column for field parameter table that gets created.
Step 5 Create a relationship between your slicer table and field parameter.
Here is how the data model will look like
Step 6 - Now When creating the Matrix Visual, instead of using dates from date tables or fact tables, Add Field parameter to the rows
Step 7 Create the Yes / No Slicer.
that should give you required results.
I hope this helps.
and I am curious if someone else over here has a different approach to this scenario
Hi,
The reply Jpss offers should be helpful.
Best Regards,
Wisdom Wu
Here is my Approach to it :
Step 1 - I created two date tables One with dates sorted in Asc order, another one with Dates sorted in Desc Order.
Step 2 - create a relationship between Date Column of these date tables with the Date column in Fact table . In your Case ATL table ( order Date Column )
Step 3 - Create a Field parameter, add date Columns from both date tables ( that we created in step 1)
Step 4 - in the Dax of field Parameters, also add another column Values "Yes" and "NO", - these will be used to build a relationship with your calculated table that you are using as a slicer. Alternatively you can use this column as a slicer itself
In the following code you can see how to add the Yes and No , to create a new column for field parameter table that gets created.
Step 5 Create a relationship between your slicer table and field parameter.
Here is how the data model will look like
Step 6 - Now When creating the Matrix Visual, instead of using dates from date tables or fact tables, Add Field parameter to the rows
Step 7 Create the Yes / No Slicer.
that should give you required results.
I hope this helps.
and I am curious if someone else over here has a different approach to this scenario
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |