Forum Discussion
DAX Measure evaulation context issue with related table
- Anonymous6 years ago
Hello all,
I think, after building a "clean" test model I've discovered the issue at hand. I have a many-to-many relationship which is causing the issue I'm seeing. My clean model has only many-to-single relationships. This would seem to make sense to me based on what I'm seeing. Based on what I've described does this make sense to everyone?
Try new measures like
Sum of Usage = calculate(SUM(Usage[Total Hours]),all(Users))
Hrs % of GT = DIVIDE(sum(Usage[Total Hours]), [Sum of Usage ])
Distributed Cost =
var _cost = maxx(product,product[Cost])
return
[Hrs % of GT] * _costAs join between user and usages has been assumed on usename /id
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Hi,
So the measures you suggested seem to work the same as the previous measures. Were you assuming a relationshp between the Transactions table and the other tables?
Thanks,
-R
- amitchandak6 years ago
Super User
I just assumed the relationship between the first two tables in your list having username.
If possible please share a sample pbix file after removing sensitive information.Thanks.
My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970- Anonymous6 years agoNot applicable
Thanks...
Yeah, I'll see about stripping it down tomorrow, or what I can do. Its using DB sources, bunch of extra data too, so a bit challenging, not impossible.
- amitchandak6 years ago
Super User
Data what you have given above, if you put that in excel and configure in power bi in the same table structure you have that can help. I can do that, just want to know table relations.