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.
Hello everyone,
My issue: I have a PBI report connected to a PBI dataset. The Total Headcount formula using the ALL function on a field works in the dataset - when I use that exact field as a slicer it is completely ignored -, but does not work in the PBI report which is connected to it.
More details:
In the dataset, I have HR data (Terminations and Headcount). The thing is that for Terminated people, I have termination type (Involuntary, Voluntary and Unknown) and for Headcount records the Termination Type will always be BLANK. All data is appended in a single table.
I wrote a Total Headcount formula using the ALL function based on Termination Type -> I want to use a "Termination Type" slicer to filter the sum of terminations by voluntary/involuntary/unknown, but these terminations must be divided to the Total Headcount irrespective of the Termination Type (as the Termination Type will always be BLANK) must not interact with the "Termination Type" slicer
Total Headcount = VAR TotalHC = CALCULATE ( SUM ( 'HR Metrics'[Measure - Preview Count] ), KEEPFILTERS ( 'HR Metrics'[Measure Type] = "Headcount" ), 'HR Metrics'[Employment Status] = "Active", ALL ( 'HR Metrics'[Termination Type] ) ) RETURN IF ( ISBLANK ( TotalHC ), 0, TotalHC ) |
However, the exact same things do not work in the PBI report which is connected to this dataset, see below the weird behaviour that I get. Normally, when I select anything in the "Termination Type" slicer, the headcount value should be as above. However, as you can see, it is not. I am confused why I even get a headcount value <> 0 when I select a value in Termination Type (as mentioned, the Termination Type for headcount will always have BLANK as vlaue)
Any help in this matter will be greatly appreciated.
Let me know if you need more info.
Solved! Go to Solution.
Hi @Anonymous ,
I can't reproduce your issue. Could you share me a sample .pbix file with the same issue for me to test? Please remove sensitive information.
In addition, my Power BI Desktop version is 2.97.801.0 64-bit (September 2021). Could you update to the latest one and test it again?
Reference: How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I can't reproduce your issue. Could you share me a sample .pbix file with the same issue for me to test? Please remove sensitive information.
In addition, my Power BI Desktop version is 2.97.801.0 64-bit (September 2021). Could you update to the latest one and test it again?
Reference: How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Icey, It was sorted. Thanks,Diana
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |