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 HELP

Hi All,

 

Im in the learning path of DAX...i have read about ALL() and below is my observation

* Acts like a filter modifier
 *Gives distinct value when used with column name 

*Gives combination of values when used with table name

*It ignore the external filter like visual/Slicer and impose the internal filter

 

However when i was doing practicals im confused how the ALL function is behaving

Numeratr = sum('Order Details'[Sales])
Denominatr = calculate(sum('Order Details'[Sales]),all('Orders'))
Numoverden = divide([Numeratr],[Denominatr],0)

 

My question is why is it ignoring filters on Lastname column when it is no where mentioned in a measure?

husnabanu_0-1612433879619.png

 

Below is the relationship model

 

husnabanu_2-1612433910979.png

 

Regards,

HB

 

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , all on order should remove all filters on order. So Filter from other table will also go away.

 

https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

Anonymous
Not applicable

@amitchandak only the Order table filter get removed .However why is it not slicing the data as per Last name which is coming from Employe table? 

@Anonymous , All means on the join ID too. Create a separate table for the Order ID and join with this table. and use all on that table and check.

Anonymous
Not applicable

@amitchandak so you mean to say that since order table has employee id as foreign key even that table gets effected with ALL() function ??

Anonymous
Not applicable

@amitchandak  can you help me here please, does this mean if a table has foreign key even those tables are affected??

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.