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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
psahai06
Frequent Visitor

Context filters with "calculate" dax calculation

Hello,

 

I have created the following formula in Power BI to create a measure that gives me dollars at the levels I need. The calculation is similar to:

 

Revenue for buckets= CALCULATE(sum('table'[dollars]),
ALL('table'),
VALUES('table'[Customer ID),
VALUES('table'[Date]),
VALUES('table'[Channel])
)
 
This keeps the dollars at the level I want it. However, I want to be able to use filters in the filter pane using dimensions that are not a part of that calculation. When I add those to the aforesaid calculation, the results become inaccurate. I would like to know: Is there a function in Power BI similar to "context filters" in tableau that allow me to overwrite/use filters in the pane outside of the calculation? I want to be able to use different dimensions in the table as filters (via the filters pane) but not add them in the formula (as they mess up the output values for some reason). 
 
For context, I am also using this calculation to create a "revenue bucket" that places the dollars in pre-defined buckets as well as the count of customers in each bucket. 
 
Thank you for your time and assistance. 
6 REPLIES 6
amitchandak
Super User
Super User

@psahai06 , Not very clear to me

 

When you take all on table it will remove all the filters. For the same reason Power BI advice to have start schema.

It means in this case you should have three dimensions tables

Customer, Date, and Channel. And now take all on those tables.

https://docs.microsoft.com/en-us/power-bi/guidance/

 

Do you really need all , that you have to check

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

 

The other option you have is summarize. example

sumx(summarize(Table, 'Customer'[Customer ID],'Date'[Date],'Channel'[Channel],"_1",sum('table'[dollars])),[_1])

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@AM I think I figured it out with your help. Thank you!

@psahai06 , who is AM ? 😀

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
parry2k
Super User
Super User

@psahai06 no single clue, what is your question? is this power bi or tableau question? I would advise you to read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



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.

IT is a power bi question. I am familiar with Tableau so I was trying to draw on the functionality that I am trying to recreate in power bi. 

 

Edit: Apologies for the confusing verbiage. I tried to make it clearer. I hope that clarified things a bit. @parry2k 

@psahai06 thanks for the clarification but still I recommend you read the post to get your answer. Although @amitchandak replied and seems like he got what you are trying to achieve but it not at all clear to me. I rather would like to understand the problem and provide a solution that makes sense and easy to digest rather than sharing few links. Good luck! You are in safe hands. 👍



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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors