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 / Compare date in Powerapps
Power Apps
Unanswered

Compare date in Powerapps

(0) ShareShare
ReportReport
Posted on by 559

Hi All,

 

I have a field called "Overall RAG" in SharePoint. I need to compare this column with Previous and Current week value. If the Previous week value of this column is changed from Red to Green then Upward arrow will be displayed. And if Previous week value of this column is changed from Green to Red then Downward arrow will be displayed, if not changed flat arrow will be displayed.

For this I need to compare with the dates from current and previous week.

 

Any help or suggestion on this? 

Thanks in advance.

Categories:
I have the same question (0)
  • v-mingkz-msft Profile Picture
    Microsoft Employee on at

    Hi @Uthhra,

    Do you want to display the different Icons according to the data from SP list?

     

    Please offer me more information:

    1. how many records do you have between one week?

    2. what types of value in "Overall RAG" field?

     

    I assume that there is only one record weekly, and the type of "Overall RAG" is text.

    I did some test according to your requirements.

     

    Please try:

    1. Add a button and set the OnSelect property as:

    Set(LastMonday,DateAdd(Today(),1-Weekday(Today(),StartOfWeek.Monday)-7,TimeUnit.Days));Set(LastSunday,DateAdd(Today(),1-Weekday(Today(),StartOfWeek.Monday)-1,TimeUnit.Days));Set(Monday,DateAdd(Today(),1-Weekday(Today(),StartOfWeek.Monday),TimeUnit.Days));Set(Sunday,DateAdd(Today(),7-Weekday(Today(),StartOfWeek.Monday),TimeUnit.Days));Set(LastC,LookUp(test,Date >= LastMonday && Date <= LastSunday).'Overall RAG');Set(C,LookUp(test,Date >= Monday && Date <= Sunday).'Overall RAG')

     

    2. Add an upward arrow Icon and set the visible property as:

    If(LastC = "red" && C = "green",true,false)

     

    3. Add an downward arrow Icon and set the visible property as:

    If(LastC = "green" && C = "red",true,false)

     

    4. Add an horizontal Icon and set the visible property as:

    If(LastC = "green" && C = "green" || LastC = "red" && C = "red",true,false)

     

     

    Best Regards,

    Kyrie Zhang

  • Sri Profile Picture
    559 on at

    Hi @v-mingkz-msft ,

    1) As per the records between one week it is not confirm it differs based on the user changing the column value. Sometimes it changes sometimes it wont. 

    2) Overall Rag has choices as (Red, Amber, Green). The color changes based upon other values. 

    Can this Overall Rag values be checked without using version history flow only by using formula?

    This Overall Rag I need to display in Dashboard so I can't use button to load the values. Can I write it on the On visible of the Screen when the screen loads can the details be captured.?

     

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
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard