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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Compare row combinations

 

Following is a snippet of my sample dataset (that has data quality issues):

ExcelPBI_0-1627352250374.png

I want to compare the rows.

If for the same client and same case, the apnt_date is the same & apnt_type is the same & apnt_status is the same & Physician is the same then only one row should be displayed. I also want to have a measure that counts the apnt_id based on the same logic. 

The result would look like this: (note only one row for client 111 with physician 'Tom' is displayed):

 

ExcelPBI_1-1627352300943.png

Here is the pbi file: https://1drv.ms/u/s!Ag919_pO_UKrgRm2OY_a1L_SOg-s?e=xh6iLO

Many thanks in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Use a measure like

countrows(summarize(Table, Table[client_id], Table[case id] , Table[apnt_date], Table[apnt_type],Table[apnt_status],Table[Physician]))

 

all the measure should use summarize

example

countx(summarize(Table, Table[client_id], Table[case id] , Table[apnt_date], Table[apnt_type],Table[apnt_status],Table[Physician], "_1", max(Table[[case id])),[_1])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Use a measure like

countrows(summarize(Table, Table[client_id], Table[case id] , Table[apnt_date], Table[apnt_type],Table[apnt_status],Table[Physician]))

 

all the measure should use summarize

example

countx(summarize(Table, Table[client_id], Table[case id] , Table[apnt_date], Table[apnt_type],Table[apnt_status],Table[Physician], "_1", max(Table[[case id])),[_1])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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