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
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.

 

 

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
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.