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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

Follow on LinkedIn
@ 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.