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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

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

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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