Forum Discussion
Counting distinct values
- 8 years ago
Above will return the Count of Missing IDs.
If you want a list of Missing IDs... Goto Modelling Tab and select NEW TABLE
List of ID's in B missing in C = EXCEPT ( FILTER ( ALL ( TableName[SystemB_ID] ), TableName[SystemB_ID] <> BLANK () ), ALL ( TableName[SystemC_ID] ) )
Thanks. I already have the data merged in single row. I am trying to find a good way to create measure to do a distinct count on each of these columns missing values, based on the distinct values in other 2 columns.
Hope this helps clarify the problem statement.
here is how i will do,
- unpviot your raw table so you have all two column one system and 2nd id
- remove blank rows
create another table by dupliating your raw table after above steps are applied, this new table,
- remove system column
- remove duplciate rows
so basically this new table will have only unique ids
close query editore and create relationship betwee id from raw to this new unique table
create two measures in your raw table:
AllId = new table
Total Id = Count(AllId[Id])
Another measure,
Count = DISTINCTCOUNT(RawTable[Id])
Another measure,
Missing Ids = [Total Id] - [Count]
choose table visual, and drop following in table:
- System (Column from raw table)
- Missins Ids (calculated measure)
You will see missing id for each system, somethign like this