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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Convert SQL to Dax

I have an sql query need to convert in dax with 3 statments.

queryquery

2 ACCEPTED SOLUTIONS
PattemManohar
Community Champion
Community Champion

@Anonymous  It seems you have single quotes as part of your data itself in the SQL query but where as in DAX you are not considering that. 

 

For Example - In SQL you are looking for 'Flat Fee Per Group' but in DAX you are looking for Flat Fee Per Group. Give a try including single quotes in your DAX search as well.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

Have you solved your problem?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

In addition, it seems that you're trying to achive if function in Power BI.

 

You could have a reference of the IF fomula below. 

 

= IF('Table_Name'[Column_Name]= " " ,'Table_Name1'[Amount],0)

If you still need help, please share your dummy pbix which can reproduce your scenario so that we can help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

Have you solved your problem?

 

If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

In addition, it seems that you're trying to achive if function in Power BI.

 

You could have a reference of the IF fomula below. 

 

= IF('Table_Name'[Column_Name]= " " ,'Table_Name1'[Amount],0)

If you still need help, please share your dummy pbix which can reproduce your scenario so that we can help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PattemManohar
Community Champion
Community Champion

@Anonymous  It seems you have single quotes as part of your data itself in the SQL query but where as in DAX you are not considering that. 

 

For Example - In SQL you are looking for 'Flat Fee Per Group' but in DAX you are looking for Flat Fee Per Group. Give a try including single quotes in your DAX search as well.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.