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
kongyuancn
Helper II
Helper II

Measre in Matrix Column

Hi There,

I have simple table:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NY45EsJAEMT+MrGDHd8OAYNP+MCW//8NNNAbqKrVkXI2t8pu4CnZVWWr2Xeo5Q37AY28Zc/Qyjv2Ezp5z35BLx/YCwzykb3CKJ/YG0xyT8j+D9ITiUc8pdEj8oynVHpkvuMpnR6hn3h+pdcX", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Name = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Name", type text}, {"Value", Int64.Type}})
in
    #"Changed Type"

It looks like as followings:

kongyuancn_0-1648018406310.png

Then I made a matrix, which looks like:

kongyuancn_2-1648018623575.png

 

Row is the Names and Column is the IDs. And I use a slicer to filter what ID I want.

Then I get a request: User want to use a simple index (1,2,3,4) on the column instead of ID. Whatever the IDs are, he want the index is always starts from 1.

Then I create a measure:

ID to Index = RANKX(ALLSELECTED('Table'), CALCULATE(MAX('Table'[ID])),,ASC)

It seems works well:

kongyuancn_3-1648018857928.png

Now I want to use this measure instead of real ID. But it seems Matrix Columns doesn't support measures.

 

Please help to guide how to implement it.

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @kongyuancn ,

Hi @Anonymous ,

If you want the measure to show up as column headers, you could create one measure for each category, and then include all of the measures in the Matrix (or Table).Other than that, I can't think of any other fa that can be achieved.

 

vluwangmsft_0-1648540059292.png

 

 

Refer:

https://community.powerbi.com/t5/Desktop/Add-a-measure-to-Column-in-Matrix-visual/m-p/668983 

https://www.goodly.co.in/measures-in-columns-matrix-powerbi/ 

 

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


Best Regards

Lucien

amitchandak
Super User
Super User

@kongyuancn , That will require dynamic segmentation. and still doubt you can get it

 

https://www.daxpatterns.com/dynamic-segmentation/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , I read your link but it dosn't meet my requeirement. 

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.