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

Equivalent logic from SQL to DAX

How to write Dax expression in Power BI from the given SQL:

 

select  
        --Job_ID,
       -- Run_ID,
        CREATED_DATE_TIME ,
        Data_domain ,
        Field_Name  ,
        rule_name   ,
        rule_description,
        check_name,
        check_description,
        check_value,
        severity,
        dataset_count,
        count(1) as ValidationFails
from    DATA_QUALITY.RESULTS_VIEW
WHERE   1=1
AND     Data_domain = 'ny_medclaim_details'
and     to_date(created_date_time) = '2022-10-20'
AND     CHECK_NAME = 'lengthCheck'
GROUP BY
    --    Job_Id,
    --    Run_ID,
        CREATED_DATE_TIME ,
        Data_domain ,
        Field_Name  ,
        rule_name   ,
        rule_description,
        check_name,
        check_description,
        check_value,
        severity ,
        dataset_count
ORDER BY 1

1 REPLY 1
AnkitKukreja
Super User
Super User

Hi! @Anonymous 

 

It is possible to achieve the solution with DAX but it cannot be equivalent to an SQL query. Please share the expected solution that you want to achieve with the data.

 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

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