hardMultiple Choice
PL-900 Practice Question: A Power Pages site uses a custom Liquid template…
A Power Pages site uses a custom Liquid template to display a list of upcoming events. The events are stored in a Dataverse table with a date field. The template should only show events that occur in the future. Which Liquid filter or condition is most appropriate?
⚠ Common exam trap
PL-900 often tests the limits of Liquid filters — candidates assume 'where' can do date comparisons like a SQL WHERE clause, but Liquid's 'where' only does simple equality/matching, so the correct answer is the explicit if condition inside the loop.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use an 'if' condition inside the 'for' loop to compare event date to current date.
Liquid does not have a built-in date-comparison filter that can evaluate 'is this date in the future' against the current time, so the reliable approach is to iterate the events with a for loop and use an if condition to compare each event's date to the current date (e.g., using 'now' or a date captured at render time). This filters the collection at render time and only outputs future events.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the 'where' filter with a date comparison.
Why it's wrong here
Liquid's `where` filter compares only exact equality against a literal value; it cannot evaluate whether a Dataverse date exceeds the current timestamp, so future events would not be isolated. It is tempting because `where` correctly filters records by a fixed field value, such as retrieving all events with status "Confirmed".
- ✗
Use the 'date' filter to format dates and then compare strings.
Why it's wrong here
Comparing formatted date strings fails because the 'date' filter outputs locale-dependent text, so lexical ordering does not match chronological ordering — "12 Dec 2025" sorts before "3 Jan 2026". The 'date' filter is genuinely for rendering a value in a chosen display format, which would be the right choice when presenting an event's date to users, not filtering.
- ✓
Use an 'if' condition inside the 'for' loop to compare event date to current date.
Why this is correct
Liquid has no date-comparison filter that evaluates against the current time, so the loop must test each event's date field against today's date using an 'if' condition. This excludes past events from the rendered list.
- ✗
Use the 'group_by' filter to group events by date and then select future ones.
Why it's wrong here
The 'group_by' filter partitions records into buckets sharing an identical field value; it performs no date comparison, so past events remain in the output. It is tempting because grouping by date suits calendar or agenda layouts that aggregate same-day events. Filtering on the date field against the current timestamp is what the scenario requires.
Go deeper
Related to this question
About these practice questions
One of 701 original PL-900 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Microsoft exam blueprint
This PL-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PL-900 exam.