web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formula Column Using S...
Power Apps
Answered

Formula Column Using Status Reason

(1) ShareShare
ReportReport
Posted on by 716
Hello Power Apps Community.

Can you help please?

I'm creating a Formula column where I want to count the number of data between the 'Created On' column when the 'Status Reason' changes to the value of 'Done'. It's numerical value is 100.

I imagine I can do this with a real time workflow or a Power Automate Flow, but wanted to try it with a formula column. Below is the formula that I'm having trouble with. 
 
If('Status Reason' = 100,
    DateDiff('Created On', 'Modified On'),
    DateDiff('Created On', Now())
)
 
The error I'm getting is:
Incompatible types for comparison. These types can't be compared: OptionSetValue (publisher_transfertask_publisher_transfertask_statuscode), Decimal.
 
Any idea what I'm doing wrong, please?

Thanks,
 
Garry
I have the same question (0)
  • RR-12011342-0 Profile Picture
    25 on at
    Hi,
     
    You cant use late bind like 100, try to use 'Status Reason'(table name).Value, here valur will be like Active or InActive.
  • Suggested answer
    mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at
    hey
     
     
    can you try this:
    If(
        'Status Reason'.Value = 100,
        DateDiff('Created On', 'Modified On'),
        DateDiff('Created On', Now())
    )
    
    if it helped please mark as verified answer
     
     
    cheers
  • CU01081947-0 Profile Picture
    716 on at
    Hello @mmbr1606,
     
    Thanks so much for the reply. No luck, unfortunately.
     
    I get this error "Name isn't valid. 'Value' isn't recognized.
     
    Sorry.
     
    Garry
  • Suggested answer
    mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at
    what kind of column type are u using?
     
    cheers
  • Verified answer
    CU01081947-0 Profile Picture
    716 on at
    Hello @mmbr1606,
     
    Again, thanks so much for replying, especially on a weekend!

    The column I'm using is the Status Reason column that comes on every Dataverse table. Sorry, I should have stated this on the original message. It's a Choice column.

    I've been asking ChatGPT and it's been throwing everything at me, but eventually this worked. Please see below.
     
    If(
        Value('Status Reason') = 100,
        DateDiff('Created On', 'Modified On'),
        DateDiff('Created On', Now())
    )
     
    Thanks so much for your help!
     
    Garry
  • mmbr1606 Profile Picture
    14,615 Super User 2026 Season 1 on at
    hey Garry
     
     
    if it worked please mark your answer as solution so we can also help others with similar issues ;)
     
     
    cheers
  • RR-12011342-0 Profile Picture
    25 on at
    Hi,
     
    Try to use 'Status Reason'(table name).Value, here value will be like Active or InActive.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard