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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Anonymous
Not applicable

operations with directQuery tab

Hello, I want to ask you for help.

I have tab1 on local and tab2 with directQuery connection.
In tab1 is column "project_number" with a lot of duplicities. In tab2 is also "project_number" but there are duplicities only for values blank and "-".
I need to make connection between tab1 and tab2 to see related "parameter" value in tab1 in all project numbers out of blank and "-". Same like in tab1 on the right side of picture.  
I tryed to create calculated column with IF to skip values with blank and "-" and with LOOKUPVALUE. It works fine, but during publishing it  alerted me that I used data from directQuery tab2 in calculated column, and it will make failure during datarefresh.
Thank you  for help

PetrK_0-1704280926317.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Below is my table1:

vxiandatmsft_0-1704694417621.png

Below is my table2:

vxiandatmsft_1-1704694435127.png

The following DAX might work for you(try to create a measure and a index column):

Measure = 
  var tab_1 = SELECTEDVALUE(Tab1[Project_number])
  return
    IF(tab_1<> "-" && tab_1<>" " , LOOKUPVALUE('Table'[parameter],'Table'[project_number],tab_1)," ")

vxiandatmsft_2-1704694497119.png

The final output is shown in the following figure:

vxiandatmsft_3-1704694527871.png

Best Regards,

Xianda Tang

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

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Below is my table1:

vxiandatmsft_0-1704694417621.png

Below is my table2:

vxiandatmsft_1-1704694435127.png

The following DAX might work for you(try to create a measure and a index column):

Measure = 
  var tab_1 = SELECTEDVALUE(Tab1[Project_number])
  return
    IF(tab_1<> "-" && tab_1<>" " , LOOKUPVALUE('Table'[parameter],'Table'[project_number],tab_1)," ")

vxiandatmsft_2-1704694497119.png

The final output is shown in the following figure:

vxiandatmsft_3-1704694527871.png

Best Regards,

Xianda Tang

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

@Anonymous , Based on what I got. Join both direct query tables on the project number and use drill through.

 

Or have a project table with a distinct Project and join with both tables. Use the project number from that table in visual and then you can use that slicer or drill through

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Thank you, I will try it.

Anonymous
Not applicable

Is here somebody how can help me? Please

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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