Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I am currently working on HR Analysis Dashboard. I have created measures like Starters and Leavers.
Leaver look like this
Leavers =
CALCULATE(
[Count of Employees]
, USERELATIONSHIP(
'Calendar'[Date]
, hra_datasource[end_date]
)
)
There is a relationship with the calendar so the correct measure is only shown when date filter is applied. So when date filter is not applied it looks like that:
I would like to see as default the total for leavers and starters of the company. Is there a way to do that in PowerBI?
Solved! Go to Solution.
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
User | Count |
---|---|
77 | |
76 | |
44 | |
31 | |
26 |
User | Count |
---|---|
97 | |
90 | |
52 | |
47 | |
46 |