Forum Discussion
Issues with average per category
- 7 years ago
I got the values to correspond with your desired value by using this
AVG Position type = IF ( NOT ( ISBLANK ( [Salary. EUR] ) ); CALCULATE ( [AVG Salary per employee]; ALL ( Employee ); KEEPFILTERS ( Position ) ); BLANK () )But are you sure your model is correct? I have not gone into details of it, but for the 2 employees without a position type the salaries are 424,95 and 156,99, while the total for this blank position type 1353,69. You might have some issues with the bidirectional filters you have set up, from 'Appointments' there are two possible paths to 'PI Entires', and this is something that might cause some issues: https://www.sqlbi.com/articles/bidirectional-relationships-and-ambiguity-in-dax/
I got the values to correspond with your desired value by using this
AVG Position type =
IF (
NOT ( ISBLANK ( [Salary. EUR] ) );
CALCULATE (
[AVG Salary per employee];
ALL ( Employee );
KEEPFILTERS ( Position )
);
BLANK ()
)But are you sure your model is correct? I have not gone into details of it, but for the 2 employees without a position type the salaries are 424,95 and 156,99, while the total for this blank position type 1353,69. You might have some issues with the bidirectional filters you have set up, from 'Appointments' there are two possible paths to 'PI Entires', and this is something that might cause some issues: https://www.sqlbi.com/articles/bidirectional-relationships-and-ambiguity-in-dax/
- Anonymous7 years agoNot applicable
Thanks, sturlaws, it works greate!
And thanks for the link, it was very useful!