Forum Discussion
Jeromec
3 years agoFrequent Visitor
Odd Dimension Table Behavior
I am still relatively new to power bi, so i could very well be doing something wrong. I've broken my problem down to only include a couple of the dimension tables as this reproduces the behavior. S...
v-zhangti
3 years agoCommunity Support
Hi, Jeromec
For the count of listing_id, you can try the DISTINCTCOUNT function.
DISTINCTCOUNT function (DAX) - DAX | Microsoft Docs
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Jeromec
3 years agoFrequent Visitor
Thanks for the reply. Yes, I know I can use disintct count. This doesn't solve my problem. Essentially
if I do this:
Count Listings for Current Period = CALCULATE(DISTINCTCOUNT(LISTINGS_FACT[LISTING_ID])) while there are 5 listings, the correct results is 3 because of the a listing in multiple locations, this is the expected result.
when I try to get a sumx with the distinct on listing_id, it always returns the rows with the duplicate location, it never seems to actually apply the distinct on listing_id.
Debug X = SUMX(LISTINGS_FACT,DISTINCT(LISTINGS_FACT[LISTING_ID])) it would expect this to sum the 3 rows but instead it does the 5 rows.