cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aamir_khan
Advocate V
Advocate V

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 IV
Super User IV

@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 <>



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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 IV
Super User IV

@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 <>



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors