Forum Discussion
Matrix Visual cell value moving to front
Hi All,
We have a data table as shown below.
Raw Data- Table Name: Customers
| Index | Country | Fiscal Quarter | Customer Name | Health |
| 1 | USA | FY Q1 2024 | T Mobile | Red |
| 2 | USA | FY Q1 2024 | J&J | Green |
| 3 | USA | FY Q2 2024 | Wallmart | Green |
Created the Matrix visual with the Health slicer as shown below.
DAX for "Custom Index" column:
When I select the Slicer value 'Green' the report will display as shown below.
But our expected results would be as shown below. In a single row.
Would it be possible to get the visual as shown above.
Could anyone please help me on this?
Thanks,
Suresh.
Bibiano_Geraldo rajendraongole1 Ritaf1983 danextian
Here is the sample .pbix file, use the link to see the solution:
TestFile.pbix
Output:Tips:
In third matrix table added custom index column and make the matrix layout tabularRename the custom index colum with blank character
make the +/- icon option off
and reduce the width of the column to make the value diappear
hope this trick will solve your problem.
13 Replies
- lbendlinSuper User
Only if you remove the "Custom Index" field from the rows, and modify your measure.
- sureshg2498Advocate II
Thank you so much Ibendlin fo your reply.
Could you please let me know what chnges needs to be done to the measure ?
- lbendlinSuper User
Implicitly via First Customer and First Health (taking advantage of the fact that Green sorts before Red)
- Bibiano_GeraldoSuper User
Hi sureshg2498 ,
In your Rankx, just rank by health as shown bellow:Custom Index = VAR CurrentCountry = 'Customers'[Country] VAR CurrentQuarter = 'Customers'[Fiscal Quarter] VAR CurrentIndex = 'Customers'[Index] VAR SortedTable = FILTER ( 'Customers', 'Customers'[Country] = CurrentCountry && 'Customers'[Fiscal Quarter] = CurrentQuarter ) RETURN RANKX(SortedTable, 'Customers'[Health], , ASC, Dense)
By default, your Matrix will look like this:- sureshg2498Advocate II
Thank you so much for your reply, Bibiano.
I did exactly what you said. But i see only one row. Could you please help me ?
Thanks,
Suresh.
- Bibiano_GeraldoSuper User
To be more accurate, please can you share a sample file? Make sure to not share sensitive information.
I didn't saw your file here on the post