Forum Discussion
Get distinct values in calculated table
- 5 years ago
Hey Anonymous ,
if you want to get only the earliest date, the following measure should do the job:
First Date by client = CALCULATE( MIN( myTable[Date appointment] ), ALLEXCEPT( myTable, myTable[Client ID] ) )If you only want to show the first row, you also have to replace the employee column with the following measure:
First Employee = VAR vFirstDate = [First Date by client] RETURN CALCULATE( MIN( myTable[Employee name] ), ALLEXCEPT( myTable, myTable[Client ID] ), myTable[Date appointment] = vFirstDate )Then you should put the two measures in a table and you get the result you want:
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - 5 years ago
Hi Anonymous ,
You can create a visual level filter:
Measure = IF(MAX('Table'[Date appointment]) = CALCULATE(MIN('Table'[Date appointment]),ALLEXCEPT('Table','Table'[Client ID])),1,0)If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hey Anonymous ,
can you share a screenshot of the result?
I think that's easier than the description.
Best regards
Denis
- selimovd5 years ago
Most Valuable Professional
Anonymous did you put your Client ID column in the table?
If you use the Client ID from the table and the 2 measures it should work:
Best regards
Denis
- Anonymous5 years agoNot applicable
selimovd the first column is the client ID.
- selimovd5 years ago
Most Valuable Professional
Anonymous then in your file there is something different from my example file 😏
Can you share the file? Like this, I could take a look directly into your case. Maybe you could remove or replace sensitive data.
- v-deddai1-msft5 years ago
Community Support
Hi Anonymous ,
You can create a visual level filter:
Measure = IF(MAX('Table'[Date appointment]) = CALCULATE(MIN('Table'[Date appointment]),ALLEXCEPT('Table','Table'[Client ID])),1,0)If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai