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! Request now

Reply
NithyaKB
Helper I
Helper I

Reg : Power BI Paginated Report builder (Parameter values with hiphen(-) not getting sorted)

Hi,
Please help me how to sort a number with dash in drop down values of a parameter in Power BI Paginated Report Builder.

NithyaKB_0-1660106646474.png

I have a column with hiphen as shown above.When I try sorting the column it gets sorted except for the double digit number after hiphen . 
For example in above screenshotthe values from 2021 - 9 till 2021 - 2 gets sorted descending order but 2021-10 , 2021-11, 2021-12 is not getting sorted . I need an output as below
2021-12
2021-11
2021-10
2021-9
2021-8
...

Below is the query for the parameter
EVALUATE SELECTCOLUMNS (ADDCOLUMNS (SUMMARIZECOLUMNS (ROLLUPADDISSUBTOTAL ('Query1'[periodfilter], "h0"), RSCustomDaxFilter(@Query1cmpcode,EqualToCondition,[Query1].[cmpcode],String)), "ParameterLevel", if ([h0], 0, 1)), "ParameterCaption", SWITCH([ParameterLevel], 1, "" & 'Query1'[periodfilter], "Blank()"), "ParameterValue", "" & 'Query1'[periodfilter], "ParameterLevel", [ParameterLevel], "'Query1'[periodfilter]", 'Query1'[periodfilter]) order by 'Query1'[periodfilter] DESC, [ParameterLevel]

2 REPLIES 2
Anonymous
Not applicable

Hi @NithyaKB ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Anonymous
Not applicable

Hi @NithyaKB ,

Since the values are identified as Text type, they are in alphabetical order... Is it possible to change the drop down values with the below formats(when the month number is less than 10, then add the prefix "0")? 

2021-09

2021-08

2021-07

2021-06

2021-05

...

Best Regards

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