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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

DAX Function Sort by Duplicate

Hello,

I'm trying to create a measure to check the occurrence of an ID in two different categories and then classify it as a third category.

Ex:

[ID]            [BASE]
123145      Table
54845        Homebroker
8485          Homebroker
123145      Homebroker
54845        Table

 

Result
[ID]       [BASE]      [CLASS]
123145 table         MHB 
54845   table        MHB

Could anyone help me?

In short, there are two columns, and every time an ID occurs in MESA and HOMEBROKER it becomes an MHB(Mesa-Homebroker). I would like to create another column with the name MHB and the other empty values.

1 ACCEPTED SOLUTION

Hey, already night my time zone, 21:35 so ping me here tomorrow and we'll do a zoom

View solution in original post

5 REPLIES 5
SpartaBI
Community Champion
Community Champion

@Anonymous check out the file sample solution.
Let me know if this is what you meant.
DAX Function Sort by Duplicate 2022-08-04.pbix


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Anonymous
Not applicable

Hello SpartaBi,

Thanks for helping me.

 

But in this case, it's just checking if the ID is table, correct?

 

He needs to check if the ID has like two categories HOMEBROKER and TABLE, understand?

Same ID, can have two categories in the same column.

 

That is, the same ID will happen more than once in the same column, one of them being MESA and another HOMEBROKER, if so, it will be classified with MHB.

I even tried to change it here, but I get an error in the number of columns.


@Anonymous do you want to show me on zoom/teams?

Anonymous
Not applicable

Yes, I would like a call via Zoom.

Would be great. Can we do it at 4:30 pm?

Hey, already night my time zone, 21:35 so ping me here tomorrow and we'll do a zoom

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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