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
rainchong7401
Helper III
Helper III

How to create and arrange the column like that.

Hi Guys,
Does anyone knows 
How should I group it like this ? (Expected Matrix Table)
Kindly advice & provide measure code and formula.
Will really appreciated.

Hi unnamed.png

1 ACCEPTED SOLUTION

@rainchong7401 

create a table

1.PNG

create a measure

Measure = if (SELECTEDVALUE('Table'[Column1])="qty",[CURPREV_SOLD_QTY],KEYMEASURES[CURPREV_SOLDL])

 

drag column1 and measure to the matrix

1.PNG





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

Proud to be a Super User!




View solution in original post

20 REPLIES 20
ryan_mayu
Super User
Super User

what does your data look like?

you can transform the data and put qty and sales in one column

1.PNG





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

Proud to be a Super User!




Hi Ryan,
I've no idea how to transform into 1 column.
Do you mind to guide me step by step?
I'm very new to Power BI 


its better to provide some sample data. If we know your data struction, we can provide proper solution for you.

pls see the attachment below to see if this is helpful

i did data transform in PQ





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

Proud to be a Super User!




Hi Ryan,
You may refer my data struction.
So that you will have more clearer picture

https://drive.google.com/file/d/14grQVsEBHFu6IES2y9zxWR4u41WUwr8C/view?usp=sharing

@rainchong7401 

create a table

1.PNG

create a measure

Measure = if (SELECTEDVALUE('Table'[Column1])="qty",[CURPREV_SOLD_QTY],KEYMEASURES[CURPREV_SOLDL])

 

drag column1 and measure to the matrix

1.PNG





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

Proud to be a Super User!




Hi Ryan,
Btw do you join the relation? 
Bcuz for me I do not see like what you see

Hi Ryan,
what if I have 3 columns now, QTY , AMOUNT & *NUMBER* (new columns)
How can I fit into measure down below ? 

Measure = if (SELECTEDVALUE('Table'[Column1])="qty",[CURPREV_SOLD_QTY],KEYMEASURES[CURPREV_SOLDL])

Measure = if (SELECTEDVALUE('Table'[Column1])="qty",[CURPREV_SOLD_QTY],if(SELECTEDVALUE('Table'[Column1])="amount",KEYMEASURES[CURPREV_SOLDL]),number)




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

Proud to be a Super User!




Hi Ryan,
Btw do you join the relation? 

Bcuz for me I do not see like what you see

no new relationship created. 





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

Proud to be a Super User!




Hi Ryan,
The qty 2020 looks kind of weird.
How come it fall under total instead of qty 2020? 

Untitled.png

the easiest way is  to turn off the subtotals. 





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

Proud to be a Super User!




Hi Ryan,
I followed exactly what you did. 
But the result did not appear. 
Kindly assist.
1.png2.png

pls try drill down the data

1.PNG





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

Proud to be a Super User!




Hi Ryan,
It doesn't work for me after drill down. 
Kindly assist.

pls check if you can download the file

https://1drv.ms/u/s!AgT7nVyoObZW4V3LbjpDOuHINyqS?e=68BWqm

 





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

Proud to be a Super User!




Hi Ryan,
Is it able to add font color or background color for every -1 year column data? 

Hi Ryan,
For now It's working.
I've no idea why? 
Anyway thank you so much. 
Appreciated for your effort.

you are welcome





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

Proud to be a Super User!




Hi Ryan,
Is it able to add font color or background color for every -1 year column data? 

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.