Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

ALL function not working in PBI report, but works in PBI Dataset

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 )
 
All works wonders in the dataset, see the below screenshots:
 
DianaFM_0-1633687190825.png

 

DianaFM_1-1633687215587.pngDianaFM_2-1633687227990.png

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)

 

DianaFM_7-1633687484134.pngDianaFM_8-1633687501455.png

Any help in this matter will be greatly appreciated. 

 

Let me know if you need more info.

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

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.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

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.

Anonymous
Not applicable

Hello Icey, It was sorted. Thanks,Diana

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors