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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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