Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 13 | |
| 10 |