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.
I have the following measure
DistinctOcc = CALCULATE(DISTINCTCOUNT(table1[pos_id_cen]))
and the following table
Why DistinctOcc is = 2
I was expecting to be =1, but cannot figure out what's wrong.
BTW, If I take out the sku_id field I get:
Would much appreciate your help
Hi @Javierco
I tried to generate the same issue but everytime I get the correct result.
Could you share the pbix?
Did it work ? 👍 A kudos would be appreciated 📢 Mark it as a solution to help spreading knowledge
Hi,
There could be some special character in one of the ID's. Also, you may simplify your measure to
DistinctOcc = DISTINCTCOUNT(table1[pos_id_cen])
When I run this using the same table data, and the same measure, it calculates correctly.
The DistinctPosIDCount measure returns a value of 1, as there is only one unique
value (7701001482309) in the "pos_id_cen" column.
Thanks. I imported the data again using a blank pbix and the measure is working as expected. Seems like it is related with the table relationships in the original pbix or the processing done after importing (or both). Will do a few more tests