Calculation based on condition in Power-BI

Abhishek Govilkar 21 Reputation points
2021-08-18T09:27:30.753+00:00

I have a data table that I would like to make a new column based on the calculation with certain conditions.

A sample of my dataset is as below:

124224-image.png

I would like to create a new column "Retailer Margin" with a formula as below:

Retailer Margin = [MRP] - [Retailer Landed Price]

As my data for retailer landed price also have some null (0) values and I want the condition that in such cases calculation should not happen and it should give a "Null" value.

The expected information for new column should be like following:

124235-image.png

Any help on the same will be highly appreciated.

Thanks in advance!

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,405 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Laude 85,676 Reputation points
    2021-08-18T10:05:30.883+00:00

    Hi @Abhishek Govilkar ,

    Please note that Power BI is currently not supported in the Q&A forums, the supported products are listed over here https://learn.microsoft.com/en-us/answers/products.

    You may ask the experts in the dedicated Power BI forum over here:
    https://community.powerbi.com/t5/Forums/ct-p/PBI_Comm_Forums

    ----------

    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,
    Leon

    0 comments No comments