Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ManishaDeval_05
Regular Visitor

Trend Sorting

I have created a measure on the trend sorting and i have alligned on the basis of down arrows will come first and up arrow which is good will come last on the basis of units and i have 10 slicer and i want that all trend will allign as per all slicer is it possible?

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@ManishaDeval_05 

Create Measures: Ensure that your measure for trend sorting is dynamic and responds to slicer selections. You can use DAX functions like SELECTEDVALUE or ALLSELECTED to capture the slicer values.

 

Sort Logic: Implement the sorting logic within your measure. For example, you can use SWITCH or IF statements to determine the sorting order based on the trend direction (down arrow first, up arrow last).

 

Apply Sorting: Use the measure to sort your visual. In Power BI, you can set the sort order of a visual based on a measure.

 

DAX
TrendSortMeasure =
VAR SelectedSlicer1 = SELECTEDVALUE(SlicerTable1[Column1])
VAR SelectedSlicer2 = SELECTEDVALUE(SlicerTable2[Column2])
-- Add more slicer variables as needed
VAR TrendDirection = IF([TrendMeasure] < 0, 1, 2) -- 1 for down arrow, 2 for up arrow
RETURN
TrendDirection +
IF(SelectedSlicer1 = "Value1", 0,
IF(SelectedSlicer1 = "Value2", 10, 20)) +
IF(SelectedSlicer2 = "ValueA", 0,
IF(SelectedSlicer2 = "ValueB", 5, 10))
-- Add more conditions for other slicers




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

4 REPLIES 4
V-yubandi-msft
Community Support
Community Support

Hi @ManishaDeval_05 ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution we provided for your issue worked for you  or let us know if you need any further assistance?

Your feedback is important to us, Looking forward to your response. 

V-yubandi-msft
Community Support
Community Support

Hi @ManishaDeval_05 ,

we wanted to check in as we haven't heard back from you. Did our solution work for you? If you need any more help, please don't hesitate to ask. Your feedback is very important to us. We hope to hear from you soon.

 

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @ManishaDeval_05 ,

Did the solution provided by @bhanu_gautam , meet your requirements, or is there any additional information you need?

If your issue is resolved, kindly mark the helpful reply as the accepted solution. This will assist other community members facing similar challenges in finding a quicker resolution.

 

Thank You.

bhanu_gautam
Super User
Super User

@ManishaDeval_05 

Create Measures: Ensure that your measure for trend sorting is dynamic and responds to slicer selections. You can use DAX functions like SELECTEDVALUE or ALLSELECTED to capture the slicer values.

 

Sort Logic: Implement the sorting logic within your measure. For example, you can use SWITCH or IF statements to determine the sorting order based on the trend direction (down arrow first, up arrow last).

 

Apply Sorting: Use the measure to sort your visual. In Power BI, you can set the sort order of a visual based on a measure.

 

DAX
TrendSortMeasure =
VAR SelectedSlicer1 = SELECTEDVALUE(SlicerTable1[Column1])
VAR SelectedSlicer2 = SELECTEDVALUE(SlicerTable2[Column2])
-- Add more slicer variables as needed
VAR TrendDirection = IF([TrendMeasure] < 0, 1, 2) -- 1 for down arrow, 2 for up arrow
RETURN
TrendDirection +
IF(SelectedSlicer1 = "Value1", 0,
IF(SelectedSlicer1 = "Value2", 10, 20)) +
IF(SelectedSlicer2 = "ValueA", 0,
IF(SelectedSlicer2 = "ValueB", 5, 10))
-- Add more conditions for other slicers




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors