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
Dalton948
Frequent Visitor

Filter table and then apply formula to said filter

I am trying to do a lookupvalue formula on filtered data. I am having issues combining the two.

The goal is as follows:

Filter table 1 to only return values that = a sepcific value in a column.
Lookupvalue on table 1 to pull\match data from table 2.
Have a new column created that returns what im wanting onto table 1.

 

Currently i transform the data in table 1 and then do the lookup value. Trying to see if can consolodate it into a formula to save some space.

Quick example Table

Table 1 
NameCreated By
TaskJohn
IncidentMark
TaskCindy
IncidentAlbert
TaskTom
  
  
Table 2 
DepartmentName
ITJohn
ITTom


So i need to Filter to only return data that results in Task under the name column on table 1 and then i want to run a lookup value formula matching on name and returning IT from department when it matches. which looks like,

LOOKUPVALUE(table 2[department],table 2 [name],table 1[created_by]). But i'm having issues applying the filter and then adding that.




1 ACCEPTED SOLUTION
Dalton948
Frequent Visitor

Yeah, i wrapped my lookupvalue formula in an if() statement.

IF(Table1[NAME]="sc_task",lookupvalue(table2[department],table2[username],table1[created by]))

View solution in original post

3 REPLIES 3
Dalton948
Frequent Visitor

Yeah, i wrapped my lookupvalue formula in an if() statement.

IF(Table1[NAME]="sc_task",lookupvalue(table2[department],table2[username],table1[created by]))

Dalton948
Frequent Visitor

Solved with an if statement

Hi @Dalton948 ,

You mentioned that you have solved it, so could you please post your solution (DAX) below and accept it as a SOLUTION to make it easier for more users experiencing similar problems to find a solution faster, thank you!

Best Regards,
Dino Tao

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.

Top Solution Authors
Top Kudoed Authors