Forum Discussion
Problems combining 2 Tables
Yes, this looks very great! In my small example it works. I'll give it later today a try in my more complex model, but I'm hopeful... I'll come back to post my progress!
But can somebody explain me what happens here; why hasonevalue?
Tried to use it in our own (more complex) model, but we now have problems with multiple facts in 1 fact table.... This gives the situation that the hasonevalue gives FALSE (I think) and makes that he chooses the wrong side of the if
CALCULATE ( SUM ( 'edm uitbetaaldefte'[uitbetaaldefte] ) )
So this is not good...
Can somebody tell us why this HASONEVALUE is in the code? When we understand this better maybe we can arrange a solution....
- Vvelarde9 years agoCommunity Champion
Another alternative solution more simpler is:
SumColumnWithDax = CALCULATE(SUM('Fact 1'[SumColumn]),RELATEDTABLE('Fact 2'))
- MiKeZZa9 years agoPost Patron
Unfortunately. Also not good....
To make it easier I've stripped + anonymised the problem PBIX; it can be found here: https://ufile.io/sih7r
We want to sum 'paid ftes' from table ftes paid, divided by the number of months, per staffmember. We also want to display a property 'relationtype' from table employment.
Combining these 2 facts gives problems.In PBIX there are 3 tables at the bottom; the first has a sum on the table. Everything is ok, except that we want to divide by the number of months. There we need DAX. In table 2 and 3 are the DAX things we've tried with help of Vvelarde. But both are not good; in the most right one we mis many record.In the middle one we with some selections made have a 'cant display visual' error, so DAX seems to be not completely good... And:- We have to display staffnumber in the visual, otherwise things go wrong
- When we have more than 1 record in 'employment' for an employee in 1 month things go wrong.
So still hoping for THE solution :smileyfrustrated: