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
Eli_
Frequent Visitor

How to change How Table appears

Hello all,

 

I would like to change how my table appears, not sure If I need to make this change by using a new visual or by doing some more transformation in the query editor.

 

Here's how it currently appears in the Table Visual:

Table 1:

NoCatQtCostLdateCol Aval
01New7$30.0001-05-201813
04New20$48.2501-02-201826
06Old10$24.0001-12-201823

 

I would to have the table above displayed as the  below instead;

Table 2:

01No01
01CatNew
01Qt7
01Cost$30.00
01Ldate01-05-2018
01Col Aval13

 

06No06
06CatOld
06Qt10
06Cost$24.00
06Ldate01-12-2018
06Col Aval23

 

 

I was "somewhat" able to achieve the result in Table 2 by doing some more transformation in the query editor, and ended up having something like what you see in Table 3 below.

Table 3

NoAttributeValue
04No04
04CatNew
04Qt20
04Cost$48.25
04Ldate01-02-2018
04Col Aval26

 

But then the challenge becomes field formatting, all data types(Test, Number, Date, Currency) ended up converting to Text, and did not appear good. This is because Value ended up becoming a single Columns with text data type(ignoring the Number, Date and Currency)

 

Can someone please help with a better way of getting this done?

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @Eli_ 

Rather than unpivoting your data you can write a measure to calculate the value to display then add the No field as the column, put the measures if in the values and set the values to display on rows.  That way you can format each measure individually.  My measure names start with 'm_' just bacause you can't have a measure and a column named the same.

MeasureMatrix.jpg

I have attached my sample file for you to take a look at.

 

If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

View solution in original post

3 REPLIES 3
Eli_
Frequent Visitor

I have marked @jdbuchanan71 response as the solution to this problem, as his/her solution document directed me to exactly what I wanted.

 

For anyone looking for the solution to this problem, and does not want to download the solution file uploaded by jdbuchanan71.

 

There two main steps required to achieve the result in Table 2 from the Table 1.

Step 1:  Change the visual used from Table to Matrix

Setp 2: Click on Format > Values > enable Show on rows

image.png

 

jdbuchanan71
Super User
Super User

Hello @Eli_ 

Rather than unpivoting your data you can write a measure to calculate the value to display then add the No field as the column, put the measures if in the values and set the values to display on rows.  That way you can format each measure individually.  My measure names start with 'm_' just bacause you can't have a measure and a column named the same.

MeasureMatrix.jpg

I have attached my sample file for you to take a look at.

 

If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

Hello @jdbuchanan71,

 

Thanks for helping on this the last time. Please there's still one more problem I'm facing.

When the "No" column is duplicate in the Table, it sums up in Matrix Visual.

See the No  1 has two records, I have set Summarization to Don't summarize. But I still get the Result below.

 

How do i prevent the summiraztion, and have 2 individual (No. 1) and not 1 Summarized one ???

 

See the Table

 

CaptureTable.PNG


See the Matirix Visual result

Capturematrix.PNG

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.