cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

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
Microsoft
Microsoft

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
Microsoft
Microsoft

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

@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

Super User IV
Super User IV

@amalrio , try to pivot or transpose the table in edit query mode.

https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/

video: https://www.youtube.com/watch?v=oKByyI09Bno

https://www.youtube.com/watch?v=I91NXohXl-o



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

@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
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors