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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mabu
Frequent Visitor

Selecting a filter (the only value left in another column) in a dax formula

Hello Community 🙂 

 

I'm trying to calculate a benchmark for a given industry code; each company is only linked to one industry 

 

Thus, when selecting a company, it should take into account the company code, whilst calculating the average for the industry (found through the selection of a given company) 

 

The below return the average ACROSS industries (the filter in the end does not apply), where it should take into account IndustryCategory[IndustryCategoryTitle_1] in the filtering (calculation):

 

CALCULATE(AVERAGE(Employee[EmployeeSeniority]);ALL(Company);ALL(Employee[EmployeeJobTitle]);FILTER(IndustryCategory;IndustryCategory[IndustryCategoryTitle_1]<>""))

 

Any input to what this might look like in dax? (I've tried a variation of selectedvalues, crossfilter and values as well) but those guys return an error. 

 

Thank you! 

 

Br,

Mads

1 ACCEPTED SOLUTION

Sorry - it was sorted out through changes in the cube. 

 

Thank you anyhow and I will remember the guidelines for my next inquiry. 

 

Br,

Mads

View solution in original post

3 REPLIES 3
v-yuezhe-msft
Employee
Employee

@mabu,

What error message do you get using the above DAX ?

Please share sample data of your tables and post expected result here following the guide in this post:https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Sorry - it was sorted out through changes in the cube. 

 

Thank you anyhow and I will remember the guidelines for my next inquiry. 

 

Br,

Mads

@mabu

Glad to hear the issue is solved. You can share detailed solution here, other members would benefit from the solution.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.