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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
dusdau
Helper II
Helper II

ALL filter not working on fact table ?

Hi All,

 

I am trying to use ALL to remove a column from filtering on my Sales fact table and it is not working.  It works fine when I using ALL to remove filters from dimension tables.  How can I do this to remove the filter context for Sales[Profit Buckets]? I want the Local Sales total for all Profit Buckets so I can use that in another calculation.

 

For example here I would expect to see the circled 172 bil number on all rows.

 

Screenshot 2022-02-01 092250.png

 

Why is ALL working differently on a dimension table vs this Sales fact table?

 

Thanks,

Dustin

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@dusdau first it is the biggest design flaw, you should be using Dimension and fact, full stop. You can surely solve it with DAX but why complicate things, anyhow following will work

 

Measure = 
CALCULATE ( SUM ( Table[Amount] ), ALL ( Table ), VALUES ( Table[Fiscal Year] ) )

 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Check my latest video on Filters and Sparklines https://youtu.be/wmwcX8HvNxc

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@dusdau first it is the biggest design flaw, you should be using Dimension and fact, full stop. You can surely solve it with DAX but why complicate things, anyhow following will work

 

Measure = 
CALCULATE ( SUM ( Table[Amount] ), ALL ( Table ), VALUES ( Table[Fiscal Year] ) )

 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Check my latest video on Filters and Sparklines https://youtu.be/wmwcX8HvNxc

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks for your feedback.  I don't want to complicate my life any further. 🙂

 

Since I need to bucket the %'s for each line in the fact table, would you recommend creating a numeric index/key for each bucket in the fact table and then create a relationship to a dimension table like:

BucketIndex 

1Negative
20-10%
310-20%
Etc. 

 

Or is there some better way?

parry2k
Super User
Super User

@dusdau you have to use ALL ( TableName ) not ALL ( Table[ColumnName] )

 

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Check my latest video on Filters and Sparklines https://youtu.be/wmwcX8HvNxc

 

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks, but that removes ALL filters, not just the Profit Bucket filter?  So if I want to remove Profit Bucket filter but include a Fiscal Year filter I get this:

 

Screenshot 2022-02-01 093721.png

Here I would want to see the FY year total in each column, regardless of profit bucket....if that makes sense?

The end goal is to calculate the % each Profit Bucket is of the FY Total to see change over Time (Fiscal Year).

mh2587
Super User
Super User

Try removefilter()


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Tried that previously, same result

 

Screenshot 2022-02-01 093158.png

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.