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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Aamir_khan
Kudo Collector
Kudo Collector

Need Help in Custom Column query

Hi All,

 

I am stuck Custom Column query. Can you please provide extact query of the below issue

 

I want to create this logic:

=IF( [@[QTE_AJUSTE]]=0, [@[EVP.PRXVDU*EVP.QTECDE]]/[@QTECDE], [@[EVP.PRXVDU*EVP.QTECDE]]/[@[QTE_AJUSTE]] )

 

And I wrote the query but I face issue:

if(([TYPEVE]="AVC"),0,if(([FAMPRO]="11") +
([FAMPRO]="14")),[(PRO.POIDS*DECODE(EVE.TYPEVE,''AVC'',0,EVP.QTECDE)/1000)],[QTECDE])

 

If you help me to resolved the issueIf you help me to resolved the issue

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Aamir_khan , What is this formula trying to do is not very clear

 

Syntax would be like

if[TYPEVE]="AVC" then 0 else if FAMPRO]="11" or [FAMPRO]="14" then <formala> else <>

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-zhenbw-msft
Community Support
Community Support

Hi @Aamir_khan ,

 

The M query conditionals logic is like this,

if-expression:

       if if-condition then true-expression else false-expression

Please refer this document,

https://docs.microsoft.com/en-us/powerquery-m/m-spec-conditionals

 

Or you can choose the conditional column to add a new column, please refer this blog.

https://radacad.com/conditional-column-in-power-bi-using-power-query-you-can-do-anything

 

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?

It will be helpful if you can show us the exact expected result based on the tables.

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Aamir_khan , What is this formula trying to do is not very clear

 

Syntax would be like

if[TYPEVE]="AVC" then 0 else if FAMPRO]="11" or [FAMPRO]="14" then <formala> else <>

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors