Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |