cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lance_6
Helper II
Helper II

Counts Not Matching: Possible Issue with relationship

I am trying to calculate the count of unique events that took place withing my data.

The issue is, the relationships aren't matching up properly(as you can see in the image with the resulting table and a couple of the measures I tried). For some reason, it isn't matching on the key for all values, and therefore treats them as a wierd hybrid composite key. 

The last image of the "Correct Result Table", is what it should look like. So basically, a group by `TaskId from History`, sum of the Session Count for each. 


I've tried a bunch of different DISTINCTCOUNT, SUMX, COUNT measures, but am overlooking something.

Any help is appreciated, thank you. 

 

Result Table and MeasuresResult Table and Measures RelationshipsRelationshipsCorrect ResultCorrect Result

 

EDIT: 

I made some progress. I managed to calculate the correct value when no slicer filters are applied. I still need to figure out how to make slicers work with this too. 

ProgressInMeasure.PNG

1 ACCEPTED SOLUTION
lance_6
Helper II
Helper II

The solution came down to using the function USERELATIONSHIP. 

 

demoR.PNG

View solution in original post

3 REPLIES 3
lance_6
Helper II
Helper II

The solution came down to using the function USERELATIONSHIP. 

 

demoR.PNG

View solution in original post

AlexisOlson
Super User
Super User

It's not clear to me what you are expecting to see.

Thank you for pointing out how unclear my post was. I have edited it for additional clarity. 

I'm not the most advanced DAX coder, but I know in R it would be something like this code chunk:demoR.PNG

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.