March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello Everyone. So my requirement is to create a column - "Serial Number Count" in the matrix table. I have used the below dax in order to group by all the columns in the table but, the issue is, for few rows the count is coming correctly and for few rows the count is coming too high, which is wrong. For few of the wrong counts, the data is populated as the whole total from the table. I am attaching the screenshots below. Please refer them.
I am using 2 different Dax's : (
1)
Screenshot with correct count:
Screenshot with wrong count:
The right count of this product is 221 but it is showing as 5232 which is the total of that product in the source.
How do I fix this?
Any help would be much appreciated. Thank you so much in advance!
The DAX functions you're using, specifically SUMMARIZE, are generally used to create new tables rather than calculated columns. This could be the reason why you're getting incorrect counts.
Use a Measure Instead of a Calculated Column
Serial Count Measure =
DISTINCTCOUNT(agg_invent_serialid_chatbot[INVENT_SERIALID])
If you need a calculated column you could use:
Serial Count Column =
COUNTROWS(
FILTER(
ALL(agg_invent_serialid_chatbot),
agg_invent_serialid_chatbot[PRODUCT_NAME] = EARLIER(agg_invent_serialid_chatbot[PRODUCT_NAME]) &&
agg_invent_serialid_chatbot[INVENT_LOCATION_NAME] = EARLIER(agg_invent_serialid_chatbot[INVENT_LOCATION_NAME]) &&
agg_invent_serialid_chatbot[Config ID] = EARLIER(agg_invent_serialid_chatbot[Config ID]) &&
agg_invent_serialid_chatbot[ITEM_NUMBER] = EARLIER(agg_invent_serialid_chatbot[ITEM_NUMBER])
)
)
Hi @MargusMartsepp I have tried creating the calculated column using the DAX you've mentioned. I am getting wrong count as below:
The first column is the calculated column which I have created using the dax you have mentioned.
Am i doing any thing wrong here?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
18 | |
16 | |
13 |