Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I want to calculate distinct count of my column in measure.
like:
Measure 2 = DISTINCTCOUNT((TAX_TRANSACTION[TAX_PAYER_NO]))
This showing wrong result as i compared with my sql query result.
Without distinct is showing right result
COUNT((TAX_TRANSACTION[TAX_PAYER_NO])) is showing right result as i compared with my sql query result.
Please let me know, how can i write expression in dax for distinct count??
Thanks
Narender
Solved! Go to Solution.
Hi All,
I got the reason of wrong value.
Measure 2 = DISTINCTCOUNT((TAX_TRANSACTION[TAX_PAYER_NO]))
I was using 2 square brackets'((' but I have to use 1 square bracket '('
Measure 2 = DISTINCTCOUNT(TAX_TRANSACTION[TAX_PAYER_NO]).
🙂
Thanks everyone.
Narender
Hi All,
I got the reason of wrong value.
Measure 2 = DISTINCTCOUNT((TAX_TRANSACTION[TAX_PAYER_NO]))
I was using 2 square brackets'((' but I have to use 1 square bracket '('
Measure 2 = DISTINCTCOUNT(TAX_TRANSACTION[TAX_PAYER_NO]).
🙂
Thanks everyone.
Narender
By the way, you may help accept the solution above. Your contribution is highly appreciated.
Do you have blank values in the column? Those have an effect on the output and might be the reason for the difference...
Br,
T
Hi
DISTINCTCOUNT() is the exact dax function for the scenario you explained, may be you are doing something wrong in either modelling.
walk through the example to have a brief idea about the result returned by DISTINCTCOUNT().
https://msdn.microsoft.com/en-us/query-bi/dax/distinctcount-function-dax
If still you face problem please attach the file or share it, we will look into the scenario.
Hi,
Your DAX staement is correct. Ideally it should show the right values
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
71 | |
70 | |
38 | |
28 | |
26 |
User | Count |
---|---|
97 | |
88 | |
59 | |
43 | |
40 |