Skip to main content

Notifications

Power Apps - Microsoft Dataverse
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
Categories:
  • RR-12011342-0 Profile Picture
    RR-12011342-0 8 on at
    Formula Column Using Status Reason
    Hi,
     
    Try to use 'Status Reason'(table name).Value, here value will be like Active or InActive.
  • mmbr1606 Profile Picture
    mmbr1606 10,450 on at
    Formula Column Using Status Reason
    hey Garry
     
     
    if it worked please mark your answer as solution so we can also help others with similar issues ;)
     
     
    cheers
  • Verified answer
    CU01081947-0 Profile Picture
    CU01081947-0 716 on at
    Formula Column Using Status Reason
    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
  • Suggested answer
    mmbr1606 Profile Picture
    mmbr1606 10,450 on at
    Formula Column Using Status Reason
    what kind of column type are u using?
     
    cheers
  • CU01081947-0 Profile Picture
    CU01081947-0 716 on at
    Formula Column Using Status Reason
    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
    mmbr1606 10,450 on at
    Formula Column Using Status Reason
    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
  • RR-12011342-0 Profile Picture
    RR-12011342-0 8 on at
    Formula Column Using Status Reason
    Hi,
     
    You cant use late bind like 100, try to use 'Status Reason'(table name).Value, here valur 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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics