Problem With Using Countx in DAX

mouzi4us

New Member
Joined
Dec 14, 2015
Messages
5
Hello friends,

I have created a data model in excel and trying to calculate the distinct count of customers in my model.
What I want is not just a simple distinct count. I want to count the customers with the positive sales Qty.

I have found a way to create a measure which works fine in calculating the desired answer. But I want to have another measure to calculate the "number of active customers in Category" in case that I have the products in my pivot table.

I will attach my data model for you in case you need to check my model.

I used this formula to calculate the Active customers with positive sales qty: "COUNTX(FILTER(ALLSELECTED(Table1[Customer Id]),Table1[Sum of Qty]>0),[Sum of Qty])"

I will be so thankful if you guys could help me in using dax "All" or whatever needed function in my measure to solve my problem
 

Attachments

  • calc.jpg
    calc.jpg
    87.9 KB · Views: 25
  • Sample.jpg
    Sample.jpg
    199.8 KB · Views: 34

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top