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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Programatically sorting card visuals

I am trying to figure out if there is a way to sort the card visuals alphanumerically or by a different field like cost. 

 

how to sort programatically2.PNGhow to sort programatically.PNG

I have figured out how to give the illusion of sorting by creating two groups of cards.  Sort data by name then create index, then sort by cost column then create another index for cost.  I assign  group one  a set of indexes and then group two the next set.  each box contains program names and is filtered by index number so box 1 only shows index 1 and so forth.  Then I use bookmarks and hide cost group and apply it to ABC button then hide alpha group and apply to Cost button.

 

I know I can use tables but prefer box look.  I can use the above approach but wonder if there is a way to change what is shown in each box when a user selects the buttom using a more programatic approach.

 

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

found another work around, I just created an additional table for each field that I wanted to sort the boxes by.  I sorted each column then added an Index column for hi-lo, lo-hi, a-z, z-a and a SortType.  I then appended the "sorting" tables into one table.  On the report each box is assigned an index number, the there is a SortType slicer that changes what the Programs are sorted by. Would still like to know if there is simplier way but this might be cleaner visual-wise than the 1st option I tried.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

ProgramIndexSort TypeCost
Program A2Cost100
Program A1Alpha100
Program B1Cost50
Program B2Alpha50
Program C3Cost700
Program C3Alpha700

 

Example  of what I think the table would look like above. The card would switch values based on what sort button the user selected so Box 1 would be filtered to only show indexes of 1 but if user selects cost would show Program B in box 1, but if Alpha is chosen then Program A would display.

danextian
Super User
Super User

Hi @Anonymous ,

It would be very tasky if  your use case involved multiple sorting options but have you tried using bookmarks?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Anonymous
Not applicable

yes I've found a solution where i use bookmarks to "sort" the cards. but trying to figure out if there is a way to use a measure or calculated field to update the cards.  

 

Anonymous
Not applicable

found another work around, I just created an additional table for each field that I wanted to sort the boxes by.  I sorted each column then added an Index column for hi-lo, lo-hi, a-z, z-a and a SortType.  I then appended the "sorting" tables into one table.  On the report each box is assigned an index number, the there is a SortType slicer that changes what the Programs are sorted by. Would still like to know if there is simplier way but this might be cleaner visual-wise than the 1st option I tried.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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