Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Dear Dax users I need help or I go crazy,
I have two tables in data model - Data, Customers
Data |
|
|
|
Customer | Month | Product | KR |
1019593 | 2020/06 | Product A | 10 |
1019593 | 2020/06 | PRoduct B | 2 |
... | ... | ... | ... |
Customers |
|
|
|
Customer | Selected month | Countrows | Distinct count month |
1019593 | 2020/06 | 2 | crashing PC |
... | ... | ... | ... |
I want to know number of months in which any product was sold. I cannot use countrows, becuase it returns 2 as there are two products sold in one month.
= CALCULATE
(
Countrows(Data);
FILTER(Data; Data[Customer] = Customers[Customer]);
FILTER(Data; Data[Month] = Customers[Selected month])
)
I guess I need to use distinct count, but if I put the formula below, the pc crashes. Do you where could be the problem? Please?
= CALCULATE
(
DISTINCTCOUNT(Data[Month]);
FILTER(Data; Data[Customer] = Customers[Customer]);
FILTER(Data; Data[Month] = Customers[Selected month])
)
Have you tried restarting your PC and reinstalling Power BI ? You might also try install DAX Studio...which will give you better insights about what queries are actually being run.
Help when you know. Ask when you don't!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |