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 / Power Apps Calendar - ...
Power Apps
Suggested Answer

Power Apps Calendar - Booking Dots on Wrong Dates & Gallery Showing Incorrect Records

(1) ShareShare
ReportReport
Posted on by 38
Hello,
 
Im a beginner in Power Apps. I'm working on a Power App with a calendar template connected to a Dataverse Bookings table. I have two issues I cannot resolve:
 
My Setup :
 
  • Power app using the built-in Power Apps calendar template
  • Dataverse Bookings table with a `Session Date` column
  • `Session Date` is a Date only format, 
  • Calendar uses standard variables `_dateSelected` and `_firstDayInView`
 
Issue 1 — Dots appear but on inaccurate/wrong dates
 
I have this formula on the `Visible` property of `Circle2_2` inside `MonthDayGallery2_2` to show a dot when a booking exists on that calendar date:

CountRows(
    Filter(
        Bookings,
        DateValue(Text('Session Date', "mm/dd/yyyy")) = 
        DateValue(Text(DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days), "mm/dd/yyyy"))
    )
) > 0
 
Dots do appear on the calendar, but they are showing on the wrong dates — they don't accurately match the actual session dates stored in the Bookings table.
 
Issue 2 — The gallery on the right side shows wrong records for the selected date
 
When a date is selected on the calendar, a gallery on the right side should show all bookings for that date. My `Items` formula for `Gallery1_1` is:

Filter(
    Bookings,
    DateValue(Text('Session Date', "mm/dd/yyyy")) = 
    DateValue(Text(_dateSelected, "mm/dd/yyyy"))
)
 
This is not working - the gallery either shows no results or displays records from a different date, not the one selected.
 
What I have already tried:
 
  • Changing `"mm/dd/yyyy"` to `"MM/dd/yyyy"` (uppercase MM for months) — did not fix it
  • Direct comparison: `Filter(Bookings, 'Session Date' = DateValue(_dateSelected))` — did not work
  • Setting a `varSelectedDate` variable in `MonthDayGallery2_2 OnSelect` using `DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days)` and filtering with that — still incorrect results
  • Splitting comparison into `Year() && Month() && Day()` — still not returning accurate results
 
My Questions :

1. Is `DateValue(Text('Session Date', ...))` not delegable to Dataverse, causing it to only process the first 500 records? Could this be why dates are inaccurate?
2. Is there a known issue comparing Dataverse Date Only fields with the calendar template's `_dateSelected` variable?
3. What is the correct, delegable formula to filter a Dataverse Date Only field against a selected calendar date?
4. Does the `_dateSelected` variable in the calendar template store a Date or DateTime value, and could that mismatch be causing the filter to fail?
 
Thanks so much to anyone who takes the time to respond - I've been stuck on this for days and would really appreciate any help to get it sorted!
preview (1).png
preview2.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
    We can't see the image as it's scanning, based on the description 
     

    Your issue is coming from using Text() and DateValue() which breaks delegation in Dataverse and also causes date mismatches.

    Since Session Date is already Date Only, you should compare it directly without conversion.

    Dot visibility:

    CountRows(
        Filter(
            Bookings,
            'Session Date' = DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days)
        )
    ) > 0
     
     

    And for the gallery:

    Filter(
        Bookings,
        'Session Date' = _dateSelected
    )
     

    If still mismatching, normalize selected date:

    Filter(
        Bookings,
        'Session Date' = _dateSelected
    )
     
    Vishnu WR
     
    Please  Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like 

     
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     
    1. Yes, DateValue(Text(...)) is not delegable to Dataverse. This is exactly why dots appear on wrong dates — it only processes the first 500 records locally and the conversion introduces timezone shifts.
     
    2. Yes, there is a known mismatch. The calendar template's _dateSelected variable stores a DateTime value (not Date only), while your Session Date column is Date Only. When Dataverse compares a DateTime against a Date Only field, the time component causes the comparison to fail or shift by one day depending on the user's timezone offset.
     
    3. The correct delegable formula for your gallery:
    Filter(
        Bookings,
        'Session Date' = DateValue(_dateSelected)
    )
    DateValue() strips the time component from _dateSelected and returns a pure date that matches your Date Only column. This is delegable.
     
    4. For the dots, same fix:
    CountRows(
        Filter(
            Bookings,
            'Session Date' = DateValue(DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days))
        )
    ) > 0
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard