Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I searched the problem but nothing worked for this case.
I calculate turnover in a specified date range. The measure shows how many people left during that time. The formula works as it should, but the total is blank. That's the formula (effective date means date of last work day):
Solved! Go to Solution.
Hi @maxabele
As tested, it works on my side.
No relationship for two tables.
Staff_Turnover =
IFERROR (
CALCULATE (
COUNTROWS ( Worker_Data ),
FILTER (
VALUES ( Worker_Data[Effective Date] ),
'Worker_Data'[Effective Date] < MIN ( 'Date'[Date] )
),
Worker_Data[Effective Date] <> BLANK ()
),
BLANK ()
)
or
Measure =
IFERROR (
CALCULATE (
DISTINCTCOUNT ( Worker_Data[worker id] ),
FILTER (
Worker_Data,
[Effective Date] <> BLANK ()
&& [Effective Date] < [mindate]
)
),
BLANK ()
)
Please make sure you turn on the "total" option,
Hi @maxabele
As tested, it works on my side.
No relationship for two tables.
Staff_Turnover =
IFERROR (
CALCULATE (
COUNTROWS ( Worker_Data ),
FILTER (
VALUES ( Worker_Data[Effective Date] ),
'Worker_Data'[Effective Date] < MIN ( 'Date'[Date] )
),
Worker_Data[Effective Date] <> BLANK ()
),
BLANK ()
)
or
Measure =
IFERROR (
CALCULATE (
DISTINCTCOUNT ( Worker_Data[worker id] ),
FILTER (
Worker_Data,
[Effective Date] <> BLANK ()
&& [Effective Date] < [mindate]
)
),
BLANK ()
)
Please make sure you turn on the "total" option,
Thanks, Maggie! Works perfectly! 😀
Hi,
Share a dataset and show the expected result.
So your issue is due to your filter statement. At the grand total level the Min('Date'[Date]) expression will return the first date in your date table and at that time noone will have left. One simple fix might be to switch this to use MAX() although that will change the nature of the measure at aggreate levels to show everyone that had left as at the end of the period (eg end of the month/quarter/year etc).
Thanks for the replies!
When I use Max instead of Min, Total returns the highest turnover that happened in the year. Any idea how I could change that to the sum of all turnover values?
<> Blank, I doubt it will work like that.
Refer to this blog post. consider termination join and remove start date filter
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
You probably need to break this down in smaller pieces to debug it.
Help when you know. Ask when you don't!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |