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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
amalrio
Helper V
Helper V

how to show text values in a mattrix

 

Hi, 

 

I have two columns like below (image 1), and I want to present in a report like in the image2

 

Image1 

Dataformat.PNG

 

Image 2

howIwant.PNG

 

hope you get the idea of what I want to achieve, if not please let me know I can explain.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @amalrio 

 

It’s my pleasure to answer for you.

According to your description,If you don’t want to change the data model, you can create a measure(Combine strings by way of newlines) to meet your requirement.

Like this:

Measure = CONCATENATEX(FILTER('Table',[text]<>""),[text],"

")

v-janeyg-msft_0-1603849034259.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

View solution in original post

5 REPLIES 5
v-janeyg-msft
Community Support
Community Support

Hi, @amalrio 

 

It’s my pleasure to answer for you.

According to your description,If you don’t want to change the data model, you can create a measure(Combine strings by way of newlines) to meet your requirement.

Like this:

Measure = CONCATENATEX(FILTER('Table',[text]<>""),[text],"

")

v-janeyg-msft_0-1603849034259.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

@v-janeyg-msft ,

 

Thanks a lot, this works perfect, 

 

I will accpe this as a  solution, also would there be a way I can sort my column order by default it comes as Base Case, Clouser and Optionality, 

 

But I want the column in below order, 

Base Case, Optionality and Clouser,  I have an ID for each of these ones but when I try to sort by in the data model it gives me error of not unique values (which is correst as I have multiple values of  those names,) is there a way to overcome this sorting issue.,

 

Thanks heaps

Hi, @amalrio 

 

You can add a new custom column in pq to sort.

Try like this:

v-janeyg-msft_0-1603951249737.png

let 
    l = List.Sort( List.Distinct(#"Changed Type"[Name])),
    tab = Table.FromList(l, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    newtab = Table.AddIndexColumn(tab, "Index", 1, 1, Int64.Type),
    i1 = Table.Max(Table.SelectRows(newtab,each [Index]=1),"Index")[Column1],
    i2 = Table.Max(Table.SelectRows(newtab,each [Index]=2),"Index")[Column1],
    i3 = Table.Max(Table.SelectRows(newtab,each [Index]=3),"Index")[Column1],
    i4 = Table.Max(Table.SelectRows(newtab,each [Index]=4),"Index")[Column1],
    x = 
    Table.Combine({
        Table.SelectRows(#"Changed Type",each [Name]=i1),
        Table.SelectRows(#"Changed Type",each [Name]=i3),
        Table.SelectRows(#"Changed Type",each [Name]=i2),
        Table.SelectRows(#"Changed Type",each [Name]=i4)

    })
in x

Here is my sample .pbix file. Hope it helps.

 

Best Regards

Janey Guo

@amitchandak ,

 

My data is the way I want, it is a matter of how do I put a text into a value section of a matrix

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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