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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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