select [ Brand Name]
from Products
where [ Brand Name] = ‘Adventure%’
how to change SQL script so that I can run script in Dax studio
select [ Brand Name]
from Products
where [ Brand Name] = ‘Adventure%’
how to change SQL script so that I can run script in Dax studio
Hello @mjmcs13,
Thank You for posting your query onto the Forum.
Based on the SQL query that you’ve provided, I’m presuming that you want to extract a list of Brand Name’s from the Products table which starts with the word “Adventure”. So in order to achieve the results based on that condition, below is the DAX query provided for the reference which you can run in DAX Studio -
EVALUATE
FILTER( DISTINCT( Products[ Brand Name] ) ,
LEFT( Products[ Brand Name] , 9 ) = "Adventure" )
Hoping you find this useful and meets your requirements that you’ve been looking for.
Note: If you want to run the query inside Power BI then just simply remove the “EVALUATE” and create a calculated table and then paste the next two lines inside it and you’ll get the same results.
Thanks and Warm Regards,
Harsh