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
rawiswarden
Helper I
Helper I

Cannot Figure Out All and AllExcept

Hello,

 

I have a calculation where I want to ignore every possible filter except one.  I have tried ALL() and ALLEXCEPT() and cannot get it to work.  When I use ALL() for all the dimension tables, the metric is no longer filtered.  When I try to remove the dimension table with the single metric I care about, it does not filter based on that metric.  If I use ALLEXCEPT() with just that single metric, I still have the results filtered by other dimensions in other tables.

 

Here is an example.  I want to calculate this and only allow it to be filtered by Dimension_LossCurves.  Am I doing something wrong or do table relationships impact these functions in a way I do not understand?

 

Cumulative Loss 2 =
VAR __PoolBal = calculate(sum(Dimension_LossCurves[Net Loan]), filter(Dimension_LossCurves, Dimension_LossCurves[Loan Age (Months)] >= max(Facts_LossCurves[Months])), allexcept(Dimension_LossCurves, Dimension_LossCurves[Year Vintage]))

RETURN

VAR __PoolPct = __PoolBal / sum(Dimension_LossCurves[Net Loan])
VAR __CumLoss = calculate(-sum(Dimension_LossCurves[Net CO]), filter(Dimension_LossCurves, Dimension_LossCurves[Loan Age (Months)] >= max(Facts_LossCurves[Months])), filter(Dimension_LossCurves, Dimension_LossCurves[Duration (Months)] <= max(Facts_LossCurves[Months])),allexcept(Dimension_LossCurves, Dimension_LossCurves[Year Vintage]))

RETURN

if(__PoolPct > .75, __CumLoss / __PoolBal, blank())
1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @rawiswarden ,

 

ALL() function will ignore your filters.

You could share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to OneDrive and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @rawiswarden ,

 

ALL() function will ignore your filters.

You could share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to OneDrive and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Unfortuantely all the data is confidential and the data model is fairly complex, so it'd be hard to randomize.  I'll just calculate this outside of Power BI for now, since I can't seem to get the behavior I'm aiming for.

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.