Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Compare row combinations

 

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

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):

 

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

Many thanks in advance!

  • 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])

1 Reply

  • 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])