Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Good Morning,
I need some help please with a distinct count with a filter.
The count is for customer, i need to filter on two dates so it is only counting where the first date is greater than the second date.
For example in the below table i would get a result of 3:
| Customer | Date 1 | Date 2 |
| 1 | 26/01/2020 | 28/02/2022 |
| 1 | 28/12/2021 | 25/11/2021 |
| 2 | 31/02/2022 | 31/01/2022 |
| 3 | 01/06/2021 | 31/05/2021 |
| 3 | 05/08/2020 | 07/04/2022 |
Hi the tables are joined by the customer number
How? Can you show a picture?
How does Table 1 know, which Date 2 belongs to which Date 1?
Thank you, i forgot to say that the two dates are from two different tables.
And how are those tables connected?!
Hi,
CustomerCount =
CALCULATE(
DISTINCTCOUNT(table[Customer]),
FILTER(
table,
table[Date 1] > table[Date 2]
)
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 64 | |
| 39 | |
| 33 | |
| 23 |