Results 1 to 1 of 1

Thread: Problem With Using Countx in DAX

  1. #1
    Neophyte mouzi4us's Avatar
    Join Date
    Dec 2015
    Posts
    2
    Articles
    0
    Excel Version
    2019

    Problem With Using Countx in DAX



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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
    Click image for larger version. 

Name:	Sample.jpg 
Views:	12 
Size:	93.1 KB 
ID:	10175Click image for larger version. 

Name:	calc.jpg 
Views:	9 
Size:	87.9 KB 
ID:	10177
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •