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
Anonymous
Not applicable

Having trouble converting the following sql query into dax. Any help much appreciated!

Hello All,

 

I am pretty new to power BI and am having trouble converting the following sql query into Dax. Any help much appreciated!

 

select tms_procurement_field_values.procurement_request_id, tms_procurement_field_values.value  
FROM tms_procurement_field_values, vw_tms_procurement_requests, vw_tms_tickets 
WHERE vw_tms_procurement_requests.id = tms_procurement_field_values.procurement_request_id 
and vw_tms_tickets.id = vw_tms_procurement_requests.ticket_id 
and vw_tms_tickets.customer_id = 4145 
and tms_procurement_field_values.field_id = 38174 
and vw_tms_procurement_requests.purpose_name = 'Complimentary Event' ;
2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi ryankahn,

 

What's the relationship between tables tms_procurement_field_values, vw_tms_procurement_requests and vw_tms_tickets? Which ones are dimensional tables and which one is fact table? If you have no need to achieve aggregation value, it's simple to achieve this, drag columns [procurement_request_id] , [value] and id from two tables into a same chart, then use visual level filter to set some filters: vw_tms_tickets.customer_id = 4145 , tms_procurement_field_values.field_id = 38174 , vw_tms_procurement_requests.purpose_name = 'Complimentary Event'

 

Regards,

Jimmy Tao

Greg_Deckler
Super User
Super User

If you use the Advanced option when connecting to SQL Server you can just paste in your SQL code.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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