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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RemkoS
Helper I
Helper I

Multiple filters in 1 visual

Hi there,

 

I have a chart in which I want two different filters in 1 chart.

RemkoS_0-1599388417141.png

Chart 1 has a filter on Stats IN (3,4,5), while chart 2 has a filter on Status IN (1,2).

However: the last column in chart 2 must multiply the 'Uren per wens' values from chart 1 by the 'Aantal wensen' values from chart 2.

How can this be achieved? The values in the last column of chart 2 are always filtered in Status IN (1,2) and that's not what I want.

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @RemkoS ,

 

>>However: the last column in chart 2 must multiply the 'Uren per wens' values from chart 1 by the 'Aantal wensen' values from chart 2.

 

I am not sure what desired result would you want, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.

 

Best Regards,

Amy 

Greg_Deckler
Super User
Super User

@RemkoS - You will need to use something like ALL or ALLEXCEPT to break out of filter context. However, the specifics are unclear to me as I do not know if "Aantal wensen" and "Uren per wens" are measures or columns or what kind of aggregation you are using if columns for example. If columns and using a SUM aggregation, then something like this might work:

Measure =
  VAR __num1 = SUM([Uren per wens])
  VAR __Categorie = MAX([Categorie])
  VAR __num2 = CALCULATE(SUM([Uren per wens]),FILTER(ALL('Table'),[Categorie]=__Categorie && [Status] IN { 3, 4, 5 }))
RETURN
  __num1 * __num2

But overall, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.

 

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@RemkoS , In this I think measure filter will be better

 

Like

calculate([Antel Wensen], filter(Table, Table[Stats] IN (3,4,5))) //Measure for Table 1

calculate([Antel Wensen], filter(Table, Table[Stats] IN (1,2))) //Measure for Table 2

 

Now to get the over all values

calculate([Antel Wensen], filter(allselected(Table), Table[Stats] IN (3,4,5))) // overall with all selected

 

calculate([Antel Wensen], filter(all(Table), Table[Stats] IN (3,4,5)))  // ignore all flter

 

Now the last one can be used every if use set of visual by separated   by slicer using interactions

https://docs.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions

 

 

 

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks Amitchandak! But for some reaso I cannot select all colums in my measure.
I can only select other measures.

This is probably a beginners mistake or misunderstanding but it limits me at this time.

Can you explain why I cannot select values other than measures?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.