cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper III

## Need custom Column

Dear All,

Need a custom colum as per requirment.

Group by ID, cosnider Current value of Maximum Serial number and assign to all the rows of that particular group.

For AA group maximum serial number is 10 its Current value os 30Y0202, now assign 30Y0202 all the rows of AA in new column.

 SerialNumber Previous Current Group ID latest Part 1 30Y1664 AA 30Y0202 2 30Y0140 AB 30Y0140 3 30Y0140 30Y0140 AB 30Y0140 4 30Y0140 30Y0140 AB 30Y0140 5 30Y0148 30Y0148 AC 30Y0148 6 30Y1664 30Y1664 AA 30Y0202 7 30Y1664 30Y0202 AA 30Y0202 8 30Y1664 30Y0202 AA 30Y0202 9 30Y1664 30Y0202 AA 30Y0202 10 30Y1664 30Y0202 AA 30Y0202

1 ACCEPTED SOLUTION
Impactful Individual

Hi @tangutoori ,

You can use the code below to create a Calculated Column to get the expect result (please adjust the code as you need):

``````Max Current =

VAR GroupId = 'Table'[Group ID]

VAR MaxSerialNumber =
CALCULATE(
MAX('Table'[Serial Number]),
FILTER('Table', 'Table'[Group ID] = GroupId)
)

RETURN
CALCULATE(
MAX('Table'[Current]),
FILTER('Table', 'Table'[Serial Number] = MaxSerialNumber)
)``````

If my reply provided you with a solution, please consider marking it as a solution ✔️or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

2 REPLIES 2
Helper III

Thank You.

Impactful Individual

Hi @tangutoori ,

You can use the code below to create a Calculated Column to get the expect result (please adjust the code as you need):

``````Max Current =

VAR GroupId = 'Table'[Group ID]

VAR MaxSerialNumber =
CALCULATE(
MAX('Table'[Serial Number]),
FILTER('Table', 'Table'[Group ID] = GroupId)
)

RETURN
CALCULATE(
MAX('Table'[Current]),
FILTER('Table', 'Table'[Serial Number] = MaxSerialNumber)
)``````

If my reply provided you with a solution, please consider marking it as a solution ✔️or giving it a kudoe 👍

Thanks!

Best regards,
Joao Ribeiro

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors