cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors