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
June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

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.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors