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

How to calculate between querys

Hi Everyone, 

 

My problem here is that on my Raw data I would like to add a column (NSAT) with the following calculation:

  VerySatisifed - Somewhat Dissatisfied+ 100

 

Capture.JPG

 

Since they are in different tables I have being unable to perform this, hopeffuly you can help me with my question. 

 

Thank you, 

 

Rod

1 ACCEPTED SOLUTION

Hi Rodrigo,

 

According to your description, you need to add a calculated column to get the value from other tables, right?

 

In DAX, we can use LOOKUPVALUE function to get the value from other table. This function returns the value in result_columnName for the row that meets all criteria specified by search_columnName and search_value.
https://msdn.microsoft.com/en-us/library/gg492170.aspx

Regards,

Charlie Liao

View solution in original post

4 REPLIES 4
GilesWalker
Skilled Sharer
Skilled Sharer

@Rodrigo Are the structures of the tables the same? If so then you could merge them all together using the merge function in the query editor.

 

Can you show a n example of the table structures?

 

Giles

Acutally I just realize that is not only a different table that I am trying to reach here but inside of the Somewhat Dissatisfied table I need an especific column. So the calculation changes a little: 

 

Capture.JPG

 

the operation should be considering the mr_string_value column that is inside of the somewhat dissatisifed table minus the mr_string_value which is on the Very Satisfied table. 

 

answering to your question, yes they do have the same instructure as you can see on the pics. 

 

NSAT: = ('Somewhat Dissatisfied'[mr_string_value]-'Very Satisfied'[mr_string_value]+100)

 

but still not working 😞 

 

 

Thanks for your help 

1.JPG2.JPG

 

instead of using the mr_string_value column I am using the count column witch makes more sanse because that one does has the value but still not working. 

Hi Rodrigo,

 

According to your description, you need to add a calculated column to get the value from other tables, right?

 

In DAX, we can use LOOKUPVALUE function to get the value from other table. This function returns the value in result_columnName for the row that meets all criteria specified by search_columnName and search_value.
https://msdn.microsoft.com/en-us/library/gg492170.aspx

Regards,

Charlie Liao

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.

Top Solution Authors