Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
Microsoft Employee
Microsoft 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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.