The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have the following table (group,entity_name,entity_order,value)
I need to present as a matrix with entity_name as the column and value as the value - the matrix is always sliced by the group attribute
I need to sort the columns using the sort_order attribute.
Now my problem is that since for each group, the same entity_name may have a differnet entity_order, I cannot simply sort the entity_name column by the entity_order column as it will complain that there are mulitple values matching.
Any suggestions?
Hi @mostho ,
Based on your description and the data provided, first of all if you want to avoid duplicate sorting, you need a column that is the only one that can be sorted in order, and you can use the Context function to merge these so that they can be sorted again. The value column is missing in the number you provided, please provide complete data and your expected results, so that we can help you faster.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
what if you change your entity_order (or make a entity_order2) in such a way that it contains the group?
Still doesn't work . The problem is that in this table
group | entity_name | entity_order | entity_order_2 |
A | a | 0 | A_0 |
A | b | 1 | A_1 |
B | a | 1 | B_1 |
B | b | 0 | B_0 |
There will be duplicates for a (A_0,B_1) and b (B_0,A_1)
Hi @johnmerm2
Would it be possible to duplicate the table in the Query Editor, delete the extra columns, remove duplicates.
Then in the front end join using the entity_name, on the unique table sort entity_name by entity_order.
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
I'd need to do this when I change the group selection in the slicer