Forum Discussion
MiKeZZa
9 years agoPost Patron
Problems combining 2 Tables
Hi guys, I'm having problems combining 2 fact tables and a DAX-measure. Can you please help me to understand what we're doing wrong? This is our datamodel: And when we're making a combinat...
Vvelarde
9 years agoCommunity Champion
Another alternative solution more simpler is:
SumColumnWithDax = CALCULATE(SUM('Fact 1'[SumColumn]),RELATEDTABLE('Fact 2'))
MiKeZZa
9 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: