Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone, I have a problem with the following issue. I have tables in "dax" with three columns. I would like to show only customers who ordered a minimum of 10 cars of the same color. Under conditions: The last 10 orders are the same color of the car. So 1 car is the same as 2 and 3 up to a minimum of 10. It follows from the above that only two clients meet the above-mentioned conditions. Customer A - The last 12 orders are Blue Car Customer D - the last 23 orders are blue cars. The other two clients do not meet the conditions because: Customer B - there are 2 different cars in the last 10 orders Client C - did not complete at least 10 orders Please, suggest how to approach the topic.
The result should be something like this
Customer A | | BLUE CAR | | 11 |
Customer D | | BLUE CAR | | 23 |
data:
CLIENTITEMDATE
Client A | | BLUE CAR | | 13.09.2021 |
Client A | | BLUE CAR | | 12.09.2021 |
Client A | | BLUE CAR | | 11.09.2021 |
Client A | | BLUE CAR | | 10.09.2021 |
Client A | | BLUE CAR | | 09.09.2021 |
Client A | | BLUE CAR | | 08.09.2021 |
Client A | | BLUE CAR | | 07.09.2021 |
Client A | | BLUE CAR | | 06.09.2021 |
Client A | | BLUE CAR | | 05.09.2021 |
Client A | | BLUE CAR | | 04.09.2021 |
Client A | | BLUE CAR | | 03.09.2021 |
Client B | | BLUE CAR | | 13.09.2021 |
Client B | | BLUE CAR | | 12.09.2021 |
Client B | | BLUE CAR | | 11.09.2021 |
Client B | | BLUE CAR | | 10.09.2021 |
Client B | | RED CAR | | 13.09.2021 |
Client B | | BLUE CAR | | 12.09.2021 |
Client B | | BLUE CAR | | 11.09.2021 |
Client B | | BLUE CAR | | 10.09.2021 |
Client B | | BLUE CAR | | 09.09.2021 |
Client B | | BLUE CAR | | 08.09.2021 |
Client B | | BLUE CAR | | 07.09.2021 |
Client B | | BLUE CAR | | 06.09.2021 |
Client B | | BLUE CAR | | 05.09.2021 |
Client B | | BLUE CAR | | 04.09.2021 |
Client D | | BLUE CAR | | 13.09.2021 |
Client D | | BLUE CAR | | 12.09.2021 |
Client D | | BLUE CAR | | 11.09.2021 |
Client D | | BLUE CAR | | 10.09.2021 |
Client D | | BLUE CAR | | 09.09.2021 |
Client D | | BLUE CAR | | 08.09.2021 |
Client D | | BLUE CAR | | 07.09.2021 |
Client D | | BLUE CAR | | 06.09.2021 |
Client D | | BLUE CAR | | 05.09.2021 |
Client D | | BLUE CAR | | 04.09.2021 |
Client D | | BLUE CAR | | 03.09.2021 |
Client D | | BLUE CAR | | 02.09.2021 |
Client D | | BLUE CAR | | 01.09.2021 |
Client D | | BLUE CAR | | 31.08.2021 |
Client D | | BLUE CAR | | 30.08.2021 |
Client D | | BLUE CAR | | 29.08.2021 |
Client D | | BLUE CAR | | 28.08.2021 |
Client D | | BLUE CAR | | 27.08.2021 |
Client D | | BLUE CAR | | 26.08.2021 |
Client D | | BLUE CAR | | 25.08.2021 |
Client D | | BLUE CAR | | 24.08.2021 |
Client D | | BLUE CAR | | 23.08.2021 |
Client D | | BLUE CAR | | 22.08.2021 |
Hi,
Im working in a solution for this problem, but i have a question. Why does Client B not meet the conditions? He has bought only blue cars and more than ten.
Regards,
Marc
Hello Mark,
i made mistake with name of client.
before
Client C | | RED CAR | | 13.09.2021 |
after correct:
Client B | | RED CAR | | 13.09.2021 |
@bjurek , to me it seem like Continuous Streak problem. Refer if this can help
https://stackoverflow.com/questions/57603253/counting-consecutive-fails-in-test-results-in-power-bi
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |