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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
GRikerWillig
Regular Visitor

Changing a Calculated Column from Text to Integer

Hello all,

Try and create some conditions within my data using calculated columns, but I've run into some issues. I'm created a few Conditional columns that I'm then trying to tie all back together to get 1 value IF and only if all of the conditions are met. However, I then need to convert that value back to an integer and it's proving complicated. Has anyone encountered anything like this before? 

My calculations are as follows:
 
PW STATUS CALC = IF('Opps'[Status]="Open",'Opps'[PW Rev],"")
 
PW Opp Status Calc = IF('Opps'[Opportunity Status]="In Process",'opps'[PW Rev],IF('Opps'[Opportunity Status]="Waiting for Approval",'opps'[PW Rev],IF('Opps'[Opportunity Status]="",'opps'[PW Rev])))
 
PW Sales Stage Calc = IF('Opps'[Sales Stage]="3-Development",'opps'[PW REV],IF('Opps'[Sales Stage]="4-Validation",'opps'[PW REV],IF('Opps'[Sales Stage]="5-Delivery",'opps'[PW REV])))
 
PW Confidence Calc = IF('Opps'[Confidence (%)]="100",'Opps'[PW Rev],IF('Opps'[Confidence (%)]="90",'Opps'[PW Rev],IF('Opps'[Confidence (%)]="75",'Opps'[PW Rev],IF('Opps'[Confidence (%)]="50","",IF('Opps'[Confidence (%)]="25","",IF('Opps'[Confidence (%)]="10","",IF('Opps'[Confidence (%)]="0","")))))))
 
PW Opp Status/Status/Sales Stage = 'Opps'[PW STATUS CALC]='Opps'[PW Opp Status Calc] && 'Opps'[PW Opp Status Calc]='Opps'[PW Sales Stage Calc] && Opps[PW STATUS CALC]='Opps'[PW Confidence Calc]
 
PW ACTUAL REV = IF('Opps'[PW Opp Status/Status/Sales Stage]="TRUE",'Opps'[PW Rev],"")
 
The ultimate goal is to transform the value in PW ACTUAL REV to a number so I can complete additional mathematical calculations against it in my dashboard.
Any direction you can provide would be greatly appreciated, I'm out of ideas.
Thanks so much!
3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Has the problem been solved? If not, please let me know.

V-lianl-msft
Community Support
Community Support

I suggest you use BLANK() instead of "" and confirm that each column with number data created is in number format.

If the problem persists,Please provide a sample pbix with dummy data.

parry2k
Super User
Super User

@GRikerWillig I would recommend paste sample data and expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.