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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
wlljhn
Regular Visitor

Displaying measure resulted in text format as matrix row

Hi

 

I'm trying to figure out how to display measures as row on a matrix in powerbi like how I normally do by pivot on excel.

Here's the illustration:

ITEMSTOCKSTOCK CLUSTER
A0Out of Stock
B50More than 50 pcs
C5Less than 10 pcs
D20Less than 50 pcs
E100More than 50 pcs

 

First 2 columns are the data, while the STOCK CLUSTER column is a measure I created.

I then want to display them like this

CLUSTERCount of ITEM
Less than 10 pcs1
Less than 50 pcs1
More than 50 pcs2
Out of Stock1
Grand Total5

 

thank you

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@wlljhn , first you have to create a measure

stk = sum(Table[STOCK]) +0

 

then you have to create a table(say bucket table) with range and meaning cluster, start and end 

create a measure like this and use with bucket tbale

Countx(filter(values(Table[Item]), [Stk] >= min(bucket[start]) && [stk] <= max(bucket[end])), [item])

 

 

Refer to my video for more details

Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yangliu-msft
Community Support
Community Support

Hi  @wlljhn ,

Its not possible to simply drag Measures to the Rows!

But you can do this:

Here are the steps you can follow:

1. Then Create a Helper Table

v-yangliu-msft_0-1620955028935.png

2. Select [CLUSTER] column, Column tools-Sort by column-ID

v-yangliu-msft_1-1620955028956.png

3. Create measure.

Count of ITEM = MAX('Table (2)'[ID])

4. Place the [CLUSTER] column in the Rows of the matrix, and place [Count of ITEM] in the Values of the matrix.

5. Result:

v-yangliu-msft_2-1620955028958.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@wlljhn , first you have to create a measure

stk = sum(Table[STOCK]) +0

 

then you have to create a table(say bucket table) with range and meaning cluster, start and end 

create a measure like this and use with bucket tbale

Countx(filter(values(Table[Item]), [Stk] >= min(bucket[start]) && [stk] <= max(bucket[end])), [item])

 

 

Refer to my video for more details

Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.