cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrKwanorama
Microsoft
Microsoft

Create calculated column based on text and probability%

Trying to create a calculated column to show the expected/probable revenue impact from a pipeline.

 

This means the column should do a function as:

If Probability = "10% - StageA" then 0.1*"Estimated revenue", 

If Probability = "30% - StageB" then 0.3*"Estimated revenue",

If Probability = "95% - StageC" then 0.95*"Estimated revenue",

 

How do I do that?

 

MrKwanorama_0-1668182142423.png

 

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@MrKwanorama ,
Is this your expectation?

Probable revenue = 
SWITCH(
    TRUE(),
    'Tablename'[Probability] = "10% - StageA", 0.1*'Tablename'[Estimated revenue],
    'Tablename'[Probability] = "30% - StageB", 0.3*'Tablename'[Estimated revenue],
    'Tablename'[Probability] = "95% - StageC", 0.95*'Tablename'[Estimated revenue],
    BLANK()
)

Thanks,

Regards,
Arul
If I answered your question kindly mark my post as a solution and a kudo would be appreciated.

View solution in original post

2 REPLIES 2
Arul
Super User
Super User

@MrKwanorama ,
Is this your expectation?

Probable revenue = 
SWITCH(
    TRUE(),
    'Tablename'[Probability] = "10% - StageA", 0.1*'Tablename'[Estimated revenue],
    'Tablename'[Probability] = "30% - StageB", 0.3*'Tablename'[Estimated revenue],
    'Tablename'[Probability] = "95% - StageC", 0.95*'Tablename'[Estimated revenue],
    BLANK()
)

Thanks,

Regards,
Arul
If I answered your question kindly mark my post as a solution and a kudo would be appreciated.

Hi sorry - accepted too soon. 

Gives me:

Function 'SWITCH' does not support comparing values of type True/False with values of type number. 

 

I have the Estimated Revenue as Decimal Number and Probability as Text.

Any suggestion?

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors