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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sabariprabu
Frequent Visitor

DAX Misbehaves for Total Calculations using ALL and Text Filter

Hi,

 

I have created below measure to get the sum of ActualBudgetDeviation by removing all the filters applied in ResourceHierarchy[ResourceHierarchyCol1] and then applying only one filter which is first 2 characters of the string should not start with "01".

 

ActualBudgetDeviationALL := CALCULATE([ActualBugetDeviation],ALL(ResourceHierarchy[ResourceHierarchyCol1]),LEFT(ResourceHierarchy[ResourceHierarchyCol1],2)<>"01")

 

But this DAX does not work. It is giving me the value for all the fields in ResourceHierarchy[ResourceHierarchyCol1] and the LEFT(ResourceHierarchy[ResourceHierarchyCol1],2)<>"01" condition does not works.

 

Please help.

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@sabariprabu 

Add filter as follows:

ActualBudgetDeviationALL :=
CALCULATE (
    [ActualBugetDeviation],
    FILTER (
        ALL ( ResourceHierarchy[ResourceHierarchyCol1] ),
        LEFT ( ResourceHierarchy[ResourceHierarchyCol1], 2 ) <> "01"
    )
)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@sabariprabu 

Add filter as follows:

ActualBudgetDeviationALL :=
CALCULATE (
    [ActualBugetDeviation],
    FILTER (
        ALL ( ResourceHierarchy[ResourceHierarchyCol1] ),
        LEFT ( ResourceHierarchy[ResourceHierarchyCol1], 2 ) <> "01"
    )
)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.