Forum Discussion
Need Help to apply sorting in dynamic created column and rows header
Hey Expert,
Here I'm with a challenging part with Power BI.
I'm creating a report similar to the tableau. Analysis-Seasonality: Link
I've been created development-related work in power bi similar to this tableau dashboard. but unfortunately, in the end, I'm stuck on the dynamic header sorting.
I need help to sort the matrix's dynamic column and rows header. Dynamic means based on the slicer selection, column, and rows header get changed. As in the below image.
In the above image, I have a dynamic slicer year * week, year * quarter, etc. based on this slicer selection header gets change.
Let's say year * week is selected, then the year will be displayed on row header, and week will be on the column header.
so help need in, If I click on Year * Week year row header and column header should be in sorted form ascending or descending whatever. Year (2015, 2016, 2017, etc.) in row header & Weeks (w1, w2, w3, and so on) in columns
Similarly when users click on other options like Month * Hour from slicer then both row header and column header should be in sorted form like Month (Jan, Feb, Mar, etc.) & Hour (0, 1, 2, 3, 4, 5, etc.). That's thing is not getting sort out by me.
Please help how can I sort this matrix.
https://www.dropbox.com/s/cjmt597dba3dsf5/HeathCare%20-%20Seasonality%20Analysis.pbix?dl=0
Anonymous
If you need your soring to work right, your weeks should be like W01, W02 . . . .W10, so on.
Change it from W1 to W01 and the same up to W9.________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
11 Replies
- Greg_Deckler
Community Champion
Anonymous - Hard to follow. You might need the Complex Selector - https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534
Otherwise, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.- AnonymousNot applicable
Hi Greg_Deckler ,
I've updated my question with a good explanation. Can you please look into it again
Thanks
- Greg_Deckler
Community Champion
Anonymous - I'm either missing it or it is still not clear. You say you want to dynamically sort the matrix but I don't see where you specify how you want the matrix sorted. For the 0 stuff, just implement a meausure that works like:
Measure =
VAR __Calc = <Some Calculation>
RETURN
IF(__Calc <= 0,BLANK(),__Calc)