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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
MrKwanorama
Microsoft Employee
Microsoft Employee

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,





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

Proud to be a Super User!


LinkedIn


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,





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

Proud to be a Super User!


LinkedIn


MrKwanorama
Microsoft Employee
Microsoft Employee

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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