Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

DAX logic in CRM field?

Posted on by 1,267

I have a custom entity, EntityA,  which has a start date and and end date. I would like to have a (calculated) field which tells me if TODAY is between start and end. So I would like to know if the post is "active".

I have exported CRM data to PowerBI and can make a new column with Yes or No value with this DAX expression:

Active = IF('EntityA'[Start]<=TODAY()&&'EntityA'[Slut]>=TODAY();"Yes";"No")

Is it possible to have the same thing /something similar in CRM?

*This post is locked for comments

  • MezMarianne Profile Picture
    MezMarianne 1,267 on at
    RE: DAX logic in CRM field?

    ScreenHunter-581.png

    Thank you. Clean solution. No code.

    I can even hide the fields and just use them for reporting.

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: DAX logic in CRM field?

    You might also do it with two calculated fields:

    - For the first field, you can use "Now()" formula

    - For the second field, you can, then, define conditions:

       IF FIRST_FIELD > Start AND FIRST_FIELD < END

           SET SECOND_FIELD=Yes

        ELSE SET SECOND_FIELD = No

    (You would need two fields since you can't compare to "Now" directly)

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: DAX logic in CRM field?

    in my opinion not directly, but you can create a custom filed to hold the value and a plugin on the retrieve and retrievemultiple messages to fill custom field with the logic you described

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans