Forum Discussion
How to show sum when no filter is applied - USERELATIONSHIP function
- Anonymous2 years ago
Hi syl-ade ,
You can update the formula of measure [Leavers] as below and check if it can return the expected result...
Leavers = IF ( ISFILTERED ( 'Calendar'[Date] ), CALCULATE ( [Count of Employees], USERELATIONSHIP ( 'Calendar'[Date], hra_datasource[end_date] ) ), CALCULATE ( [Count of Employees], ALL ( hra_datasource ) ) )If the above ones can't help you figure out, please provide some raw data in your table 'hra_datasource' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi syl-ade ,
You can update the formula of measure [Leavers] as below and check if it can return the expected result...
Leavers =
IF (
ISFILTERED ( 'Calendar'[Date] ),
CALCULATE (
[Count of Employees],
USERELATIONSHIP ( 'Calendar'[Date], hra_datasource[end_date] )
),
CALCULATE ( [Count of Employees], ALL ( hra_datasource ) )
)
If the above ones can't help you figure out, please provide some raw data in your table 'hra_datasource' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards