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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
GMichaud
Helper I
Helper I

Is there a way to calculate the value of a measure based on a filter chosen on a given vizual

Hello dear community!

As mentionned in the subject, is there a way to do it.

The way I have to do it now is not pretty, which is to create two fixed measures based on each department in my organization. Here is the context. I would like to be able to put in a pie chart the number of calls transfered to second level per department compared to the number of calls transfered for the whole organization. Here is a pie chart example :

GMichaud_0-1622142639491.png

 

To be able to do this, I had to create a measure that calculates the number of calls transfered for a given department and another measure that calculates the number of calls for the whole organization minus the number of calls transfered for that given department.

Would it be possible to create only two measures that would filter on the department selected on the vizual instead of having to create two measures per departement.

I tried to use CALCULATE with a filter on SELECTEDVALUE, but DAX will not allow that...

Thanks for your help!

1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @GMichaud ,

 

Try to refer to my sample.

v-lionel-msft_0-1622427739765.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @GMichaud ,

 

Try to refer to my sample.

v-lionel-msft_0-1622427739765.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@GMichaud , If the measures are connected with the department table, or department belongs to table from where measures are created. it should filter automatically

 

 

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

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Since I want to compare the same value for a single department versus the whole orgnization, if I filter that department, out the organization will have the same number of transfers as the department, as per intended in Power BI.

That is not what I am looking for here.
As mentionned, I want to compare the number of transfers for a department versus the whole organization.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.