cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Only one row for a group

Hello!

 

I'm new to Power BI and I'd like a help for this problem:

 

I have a table with ID and Reason Code, like that:

 

ID Reason Code  Only this row for ID?

1   183                 False

1   1                     False

1   3                     False

2   183                 True

3   183                 True

4   183                 False

4   1                     False

 

I need to discover if the reason code 183 is followed by other reason codes. I mean, if the reason code 183 is the only row for that id.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Only one row for a group

Measure = COUNTROWS(Table)

Put this into a table visualization with ID. Filter Measure > 1.

 

Alternatively, create another table of just unique ID's. Relate the tables. Create a calculated column in this table like:

 

Column = IF(COUNTROWS(RELATEDTABLE(Table))>1,"False","True")

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

1 REPLY 1
Highlighted
Super User IV
Super User IV

Re: Only one row for a group

Measure = COUNTROWS(Table)

Put this into a table visualization with ID. Filter Measure > 1.

 

Alternatively, create another table of just unique ID's. Relate the tables. Create a calculated column in this table like:

 

Column = IF(COUNTROWS(RELATEDTABLE(Table))>1,"False","True")

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors