Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Solved! Go to Solution.
Hi @aiton_grant
Try below:
Customers measure =
CALCULATE(
DISTINCTCOUNT('Purchase FACT'[Customer ID]),
FILTER(
VALUES('Purchase FACT'[Customer ID]),
VAR HasBikeOrScooter =
CALCULATE(
COUNTROWS('Purchase FACT'),
'Product Detail'[Product Category] IN {"BIKE", "Scooter"}
) > 0
VAR HasCar =
CALCULATE(
COUNTROWS('Purchase FACT'),
'Product Detail'[Product Category] = "CAR"
) > 0
RETURN
HasBikeOrScooter && NOT(HasCar)
)
)Please give kudos or mark it as solution once confirmed.
Thanks and Regards,
Praful
Hi @aiton_grant ,
I think you want to count the customers that never had bought any car. So you can write a measure as follows:
Hi @aiton_grant ,
I think you want to count the customers that never had bought any car. So you can write a measure as follows:
This was helpful, and worked with a very small dataset, but led to lack of resource timeouts when I tried it for the whole dataset.
To simplify the DAX code, take the Customer from the Sales table and for a single value you do not need IN
CALCULATE(
DISTINCTCOUNT(Sales[Customer ID]),
'Product Detail'[Product Category] <> "CAR",
'Product Info'[Product Category] IN {"BIKE", "Scooter"}
)
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @aiton_grant
Try below:
Customers measure =
CALCULATE(
DISTINCTCOUNT('Purchase FACT'[Customer ID]),
FILTER(
VALUES('Purchase FACT'[Customer ID]),
VAR HasBikeOrScooter =
CALCULATE(
COUNTROWS('Purchase FACT'),
'Product Detail'[Product Category] IN {"BIKE", "Scooter"}
) > 0
VAR HasCar =
CALCULATE(
COUNTROWS('Purchase FACT'),
'Product Detail'[Product Category] = "CAR"
) > 0
RETURN
HasBikeOrScooter && NOT(HasCar)
)
)Please give kudos or mark it as solution once confirmed.
Thanks and Regards,
Praful
This was the best solution! Thank you!
Hi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 49 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 122 | |
| 120 | |
| 38 | |
| 36 | |
| 29 |