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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Ion_Gomez
Frequent Visitor

Group display values

Hello everyone

I would like to know if it is possible to add the values of the columa that says "Order Code" on a single line. Attached image

tabala pedidos.png

This is how the matrix display comes out when I add the order code column. I'd like you to come out this other way.

tabala pedidos 2.png

I do not know if with concatenatex or there is some dax function in which you can put it as in the imagne and so instead of appearing several lines per project that appears only one row.

The data is in different but related columns.

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Ion_Gomez ,

 

Create an index column in power query and a calculated column as below:

 

_Order number = 
var _index=MAXX(FILTER('Table','Table'[Index]<EARLIER('Table'[Index])&&'Table'[Order number]<>BLANK()),'Table'[Index])
Return
IF('Table'[Order number]=BLANK(),CALCULATE(MAX('Table'[Order number]),FILTER('Table','Table'[Index]=_index)),'Table'[Order number])

 

Then create a measure as below:

 

Measure = CONCATENATEX(FILTER(ALL('Table'),'Table'[_Order number]=MAX('Table'[_Order number])),'Table'[Order code],"-")

 

And you will see:

Annotation 2020-07-08 145046.png

For the related .pbix file,pls click here.

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi  @Ion_Gomez ,

 

Create an index column in power query and a calculated column as below:

 

_Order number = 
var _index=MAXX(FILTER('Table','Table'[Index]<EARLIER('Table'[Index])&&'Table'[Order number]<>BLANK()),'Table'[Index])
Return
IF('Table'[Order number]=BLANK(),CALCULATE(MAX('Table'[Order number]),FILTER('Table','Table'[Index]=_index)),'Table'[Order number])

 

Then create a measure as below:

 

Measure = CONCATENATEX(FILTER(ALL('Table'),'Table'[_Order number]=MAX('Table'[_Order number])),'Table'[Order code],"-")

 

And you will see:

Annotation 2020-07-08 145046.png

For the related .pbix file,pls click here.

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Buenas Kelly,

I got what I wanted, the problem now is that it is repeated. it comes out this way..

Captura de pantalla 2022-04-09 162325.png

Hello kelly couldo you please resende the pbx?

Thank you

amitchandak
Super User
Super User

@Ion_Gomez , you need to use concatenatex

https://docs.microsoft.com/en-us/dax/concatenatex-function-dax

 

new measure = (Table,Table[cadigo pedio])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
harshnathani
Community Champion
Community Champion

Hi @Ion_Gomez ,

 

you can try this this measure

 

Concat =
CONCATENATEX (
    FILTER (
        ALL (
            'Table'[Codigo Proyecto],
            'Table'[Codigo Pedio]
        ),
        'Table'[Codigo Proyecto]
            = MAX ( 'Table'[Codigo Proyecto] )
    ),
    CALCULATE (
        MAX ( 'Table'[Codigo Pedio] )
    ),
    UNICHAR ( 10 )
)

 

 


Regards,

Harsh Nathani


Appreciate with a Kudos!! (Click the Thumbs Up Button)

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.