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
Anonymous
Not applicable

Basic (not complex) RAG - Single Text to Number Conversion

Hi there, 

 

I have spent a while looking through a simple way to convert RAG status to individual numbers - The information is pulled from a sharepoint list into PowerBI, however, I can only find overly complicated/partial solutions that do not give me what I need. The cassification will either be "R", "A" or "G" as below:

dairvine_0-1643998598925.png

What is the exact formula that I would need in creating a new column to convert R = 1, A = 2 and G = 3 ?

dairvine_1-1643998957511.png

 

 

I would then pull this information through and use conditional formatting for icons to support dashboard creation (visuals). 

 

Thanks for any support that you could give here 🙂 

1 ACCEPTED SOLUTION

Hi, @Anonymous 

 

 Try this:

 

each if [Status] = "R" then 1 else if [Status] = "A" then 2 else if [Status] = "G" then 3 else null

 

 




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@Anonymous Try:

if [Status] = "R" then 1 else if [Status] = "A" then 2 else if [Status] = "G" then 3

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler thanks for the support, however, it doesnt work, I have the following issue: 

dairvine_0-1644142243049.png

any suggestions? thanks in advance 🙂

Hi, @Anonymous 

 

 Try this:

 

each if [Status] = "R" then 1 else if [Status] = "A" then 2 else if [Status] = "G" then 3 else null

 

 




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




Anonymous
Not applicable

@ALLUREAN perfect, exactly what I needed! Thank you both for your support and trouble shooting here. Great community!

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.