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

Please help convert SQL to DAX?

Hello,

I am trying to create a new column in the query editor can someone please tell me the DAX for

 

case when nvl (STAFF_ABILITY_RESOLVE_ISSUES, 'N/A') = 'N/A' then null else to_number (STAFF_ABILITY_RESOLVE_ISSUES) end as atri,

 

my issue is that I am doing direct query and it does not allow me to convert columns to data types. Whats worse is there are N/A's in the results. So we need the N/A's to be null and we need the values to be number format or better yet decimal number format. 

1 REPLY 1
Phil_Seamark
Employee
Employee

Hi @Anonymous

 

I replied to your other post for the same thing.  But please try

 

Column = 
    SWITCH(
        TRUE() ,
        ISNUMBER('Table1'[STAFF_ABILITY_RESOLVE_ISSUES]), FIXED('Table1'[STAFF_ABILITY_RESOLVE_ISSUES],2),
        BLANK()
        )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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.