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

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

Reply
sachingupta31
New Member

Grouping multiple rows in 1 based on one column value in Power BI

Hello,

 

I have below data in power BI.

URLCount
/XXX/v1/sac5
/XXX/v1/sac/10

 

What I would like to do is group the URL column value after cleaning them and then the final output should be like below

 

URLCount
/XXX/v1/sac15

 

For first step I had removed the '/' from the end to make the URL same so that we can group. Below is the expression I have written.

Right (col1], 1) = "/",
LEFT(col1, LEN(col1) -1),
col1
)

which gives the output = /XXX/v1/sac

For 2nd step I am trying to group using  SUMMARIZE DAX function, but it is not working for me. Can someone help on to achieve the desired output?

 

Thanks,

Sachin

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sachingupta31 ,

Below is my table:

vxiandatmsft_0-1700715563152.png

The following DAX might work for you:

Measure = 
   CALCULATE(
      SUM('Table'[col2]),
      ALLEXCEPT('Table','Table'[col 1])
   )

The final output is shown in the following figure:

vxiandatmsft_1-1700715616659.png

Best Regards,

Xianda Tang

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

3 REPLIES 3
Rupak_bi
Super User
Super User

if the Url exactly matches, it should work. please share sample data to check.



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

sachingupta31_0-1700698128399.png

Hi @Rupak_bi  PFA, sample data and output.  Also, col1 is a column in a table and Col2 is measure created using below formula.
col2 Measure formula= CALCULATE(COUNT(Related Features))

please let me know if it works.

Anonymous
Not applicable

Hi @sachingupta31 ,

Below is my table:

vxiandatmsft_0-1700715563152.png

The following DAX might work for you:

Measure = 
   CALCULATE(
      SUM('Table'[col2]),
      ALLEXCEPT('Table','Table'[col 1])
   )

The final output is shown in the following figure:

vxiandatmsft_1-1700715616659.png

Best Regards,

Xianda Tang

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.