Forum Discussion
calculating unique count based on a filtered condition
| term_id_new | Sale Date |
| BBTN01001 | 11/26/2023 |
| BBTN01001 | 12/1/2023 |
| BBTN01001 | 12/3/2023 |
| BBTN01001 | 12/5/2023 |
| PBTN01001 | 12/20/2023 |
| PBTN01001 | 9/1/2023 |
| PBTN01001 | 9/1/2023 |
| PBTN01001 | 9/1/2023 |
| PBTN01001 | 9/1/2023 |
| LTTN01001 | 12/20/2023 |
| LTTN01001 | 9/2/2023 |
| LTTN01001 | 9/3/2023 |
| LTTN01001 | 9/8/2023 |
Expected Output:
| term_id_new | Sale Date |
| PBTN01001 | 12/20/2023 |
| LTTN01001 | 12/20/2023 |
Hii numaan_99,
Based on my understanding, I found the solution belowTry this,
1. Minimum of sael date for each Term_id:
2. Terminal Id for the last date 20/12/2023:
Did I answer your question?
Mark my post as a solution, this will help others...!
Hit the kudo also,
Thank you.
7 Replies
- Vallirajap
Resolver III
Hii numaan_99
Use the below dax:Count = Count(('Table (4)'[Term_id]))Did I answer your question?
Mark my post as a solution, this will help others...!
Hit the kudo also,
Thank you
- numaan_99Frequent Visitor
but i need to find out minimum of "sale date" for each terminal id. then out of those, i only need to keep terminals IDs whose last date is 20/12/2023. i need to create a separate column for this. and using that column, i will do some calculations in future. please provide me any queiry formulas in detail.
- Vallirajap
Resolver III
Hii numaan_99,
Based on my understanding, I found the solution belowTry this,
1. Minimum of sael date for each Term_id:
2. Terminal Id for the last date 20/12/2023:
Did I answer your question?
Mark my post as a solution, this will help others...!
Hit the kudo also,
Thank you.
- Ahmedx
Super User
- numaan_99Frequent Visitor
but i need to find out minimum of "sale date" for each terminal id. then out of those, i only need to keep terminals IDs whose last date is 20/12/2023. i need to create a separate column for this. and using that column, i will do some calculations in future. please provide me any queiry formulas in detail.