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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Bhavyasree
Frequent Visitor

How to add 2 columns into single column in matrix visual

Bhavyasree_0-1666546029704.png

Here i have added Segment column and Totalorder dax function.Now i want add "Standard Class" from the Ship Mode as a new under under Home Office.Can anyone pls help me on this.

Bhavyasree_1-1666546162331.png

 

1 ACCEPTED SOLUTION

Hi, @Bhavyasree 

Not fully sure what you want.

Maybe you need add another table like:

Table 2 = UNION(VALUES('Table'[Segment]),{"Standard Class"})

veasonfmsft_2-1666591208685.png

Then count the total orders based on this new table.

NewTotalOrders =
IF (
    MAX ( 'Table 2'[Segment] ) IN VALUES ( 'Table'[Segment] ),
    CALCULATE (
        COUNT ( 'Table'[Order ID] ),
        'Table'[Segment] = MAX ( 'Table 2'[Segment] )
    ),
    CALCULATE ( COUNT ( 'Table'[Order ID] ), 'Table'[Ship Mode] = "Standard Class" )
)

Please check if attached pbix could work for you.

 

Best Regards,
Community Support Team _ Eason

View solution in original post

7 REPLIES 7
v-easonf-msft
Community Support
Community Support

Hi, @Bhavyasree 

If I understand you correctly, you may need to drag field "Ship Mode" to the row of Matrix.

veasonfmsft_0-1666581285638.png

Best Regards,
Community Support Team _ Eason

Thanks for your reply but I dont want to add Ship Mode Column.I want to add only "Standard Class" From the ShiMode column.

Hi, @Bhavyasree 

Is this what you want? If so, try to filter data in the filter pane of this table visual.

veasonfmsft_0-1666589713217.png

 

Best Regards,
Community Support Team _ Eason

I dont want Hierarchy also ...I want it to add it as a new row under Home Office Segment. I think i need to do groupby but im not sure about that .If it is correct please share the dax function of Groupby.

Hi, @Bhavyasree 

Not fully sure what you want.

Maybe you need add another table like:

Table 2 = UNION(VALUES('Table'[Segment]),{"Standard Class"})

veasonfmsft_2-1666591208685.png

Then count the total orders based on this new table.

NewTotalOrders =
IF (
    MAX ( 'Table 2'[Segment] ) IN VALUES ( 'Table'[Segment] ),
    CALCULATE (
        COUNT ( 'Table'[Order ID] ),
        'Table'[Segment] = MAX ( 'Table 2'[Segment] )
    ),
    CALCULATE ( COUNT ( 'Table'[Order ID] ), 'Table'[Ship Mode] = "Standard Class" )
)

Please check if attached pbix could work for you.

 

Best Regards,
Community Support Team _ Eason

This is what i want .Thank you so much.

I dont want Hierarchy also ...I want it to add it as a new row under Home Office Segment. I think i need to do groupby but im not sure about that .If it is correct please share the dax function of Groupby.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.