The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello, seeking assistance in resolving an issue with the result I am getting from the follwing DAX:
Hi @AMBP1973,
Thank you for reaching out to the Microsoft fabric community forum. Also, thanks to @sreejad, @MasonMA, @Irwan, for those inputs on this thread. I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.
I am also including .pbix file for your better understanding, please have a look into it:
Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.
Thank you for using the Microsoft Community Forum.
Hello @v-kpoloju-msft @sreejad, @MasonMA, @Irwan,
Thankyou for your responses. Unfortunately I am still having issues. I have tried all the solutions but either get errors or the same 8k+ count, or just a count of 1. I have responded directly to @sreejad directly as I found that these may be closer to the result I may need. Unfortuantely I cannot share the specific data due to organisational confidentiality.
appreciate any additional advice 🙏
Hi @AMBP1973,
Thanks for clarifying, and I completely understand you cannot share the real dataset due to confidentiality.
To help us troubleshoot without exposing sensitive data, could you try creating a small mock dataset that follows the same column names, data types, and general patterns as your real data, but with all values replaced or randomized? Even 5–10 sample rows are often enough for us to test.
Here is a guide you can use to create and share such data safely:
Get samples for Power BI - Power BI | Microsoft Learn
If creating a mock dataset isn’t possible, another option is to share:
With that information, we can try to reproduce the issue in our own test environment and work toward a solution.
Thank you.
Hi @AMBP1973,
We haven’t received a response with the requested sample data to help troubleshoot your issue effectively.
To proceed further, please share a minimal and clean sample dataset (not a screenshot) along with the expected output. This helps the community understand and resolve your question
faster.
Thank you.
Hi @AMBP1973,
Following up again as we still haven't received the required sample data or clarification to assist with your issue. Please provide sample data in text or table format (no screenshots) and Expected output based on that data or Any other clarifying details relevant to the issue.
Thank you.
Hello @AMBP1973
I copied your dax , but if it has duplicate data those rows will also be counted, if there is any particular column you can consider you can use below dax
Measure2 = CALCULATE(DISTINCTCOUNT(Sheet1[Column1]),FILTER(Sheet1,Sheet1[Column2]="Yes"))
or else if you want to count distinct rows in entire table then use below
Measure = CALCULATE(COUNTROWS(DISTINCT(FILTER(Sheet1,Sheet1[Column2]="Yes"))))
thanks.
Hello @sreejad , thankyou for your solution. Yes, it seems as though it is counting duplicate rows instead of doing a distinc count of the values.
I have tried your 'measure2' sugggested DAX but am only receiving a count of 1 as a result? Is there anything I have done incorrectly based on the below?
Hello @AMBP1973
you are using same column for filtering and count as well that is the reason you got 1. we have to consider column for which we need to find count for example you mentioned like you have to get 20 count based on which column your determining that use that column. In formula i mentioned i have used different column
Hope it works.
Thanks.
Hello @AMBP1973
If it is a Measure it should be working as expected in report.
As mentioned in your post, If it is a calculated column in a table I would also create a flag column like below:
Flag =
IF(
'Assurance Activities'[ERP Impact] = "Yes",
1,
0
)
and sum the values in reporting.
If not working please share some sample data for measure debugging.
Thanks
hello @AMBP1973
i copy your DAX and it works well.
your DAX is counting row in table with yes value.
is there any filter to get 20marks? like datetime or id filter?
Thank you.
User | Count |
---|---|
20 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
29 | |
12 | |
11 | |
9 | |
8 |