cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MrPencil Frequent Visitor
Frequent Visitor

How to calculate with two tables in Direct Query Mode?

Hello,

I create the reports in Direct Query mode. I have 2 tables. One with header data, the other with position data. Table 1 shows the currency with the conversion rate. Table 2 shows the individual prices per item. I would now like to determine the prices from Table 2 with the conversion rate from Table 1. In Direct Query mode, I can not find a solution to create a new column or measure.

Thank you in advance. Best regards.

1 ACCEPTED SOLUTION

Accepted Solutions
v-huizhn-msft Super Contributor
Super Contributor

Re: How to calculate with two tables in Direct Query Mode?

Hi @MrPencil,

Please click File -> Options and then Settings -> Options -> DirectQuery, then selecting the option "Allow unrestricted measures in DirectQuery mode". When that option is selected, any DAX expression that is valid for a measure can be used. You can create calculated column and measures.

Capture1.PNG

 

Create relationship between the tables, and get the the prices from another table using RELATED function by creating calculated columns or measures. Here is a thread which displays how to use related fucntion to lookup expected value, please review.

If you have any issue, please let me know.

 

Best Regards,
Angelia

2 REPLIES 2
v-huizhn-msft Super Contributor
Super Contributor

Re: How to calculate with two tables in Direct Query Mode?

Hi @MrPencil,

Please click File -> Options and then Settings -> Options -> DirectQuery, then selecting the option "Allow unrestricted measures in DirectQuery mode". When that option is selected, any DAX expression that is valid for a measure can be used. You can create calculated column and measures.

Capture1.PNG

 

Create relationship between the tables, and get the the prices from another table using RELATED function by creating calculated columns or measures. Here is a thread which displays how to use related fucntion to lookup expected value, please review.

If you have any issue, please let me know.

 

Best Regards,
Angelia

MrPencil Frequent Visitor
Frequent Visitor

Re: How to calculate with two tables in Direct Query Mode?

Hi Angelia,

thanks for you help. I have changed the setting for "Allow unrestricted measures...", but the function RELATED won't work. It is only possible to work with RELATEDTABLE. That ist not what I want.

 

But I found another solution for my problem. I didn't know the possibilty to extract a "related table" within a table. After that I could work with the column "invoice.currency" and I can calculate the sales in one currency.

Best regards

Thomas

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 121 members 1,591 guests
Please welcome our newest community members: