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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create a calculated column from a percent column

Hi all, 

I need a formula please to create a column from another column,

Here'is my excel formula : =IFS(Q2=0%,"DRAFT",(AND(Q2>0%,Q2<100%)),"IN PROGRESS",Q2=100%,"CLOSED")

I tried this formula on power Bi : 

Status = IF('DATA'[Progress] = 0 , "DRAFT", IF('DATA'[Progress] < 100 && 'DATA'[Progress] > 0 , "IN PROGRESS" , IF('DATA'[Progress] = 100 , "CLOSED")))
But It doesn't give me the right result, for a 100% of progress, the status still in progress or it should be closed.
Thanks,

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI  @Anonymous 

Just adjust the the formula as below:

Status =
IF (
    'DATA'[Progress] = 0,
    "DRAFT",
    IF (
        'DATA'[Progress] < 1
            && 'DATA'[Progress] > 0,
        "IN PROGRESS",
        IF ( 'DATA'[Progress] = 1, "CLOSED" )
    )
)

 

 

Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you all

It worked

 

v-lili6-msft
Community Support
Community Support

HI  @Anonymous 

Just adjust the the formula as below:

Status =
IF (
    'DATA'[Progress] = 0,
    "DRAFT",
    IF (
        'DATA'[Progress] < 1
            && 'DATA'[Progress] > 0,
        "IN PROGRESS",
        IF ( 'DATA'[Progress] = 1, "CLOSED" )
    )
)

 

 

Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
TomMartens
Super User
Super User

Hey @Anonymous ,

 

I use this DAX statement to create a calculated column:

Status = 
var __Progress = 'Table'[Progress]
return
SWITCH(
    TRUE() 
    , __Progress = 0 , "Draft"
    , __Progress = 1 , "Closed"
    , "In Progress"
)

As you can see, it's using a variable to avoid multiple evaluations of the Progress column. The table will look like this:

image.png

The DAX is not that different from the code you provided, you might double-check the value of the Progress column, it 75% is expressed as 0.75, this would explain why your statement returns "IN PROGRESS" instead of "CLOSED".

 

Regards,

Tom

 

 

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.