Forum Discussion

GabrielLyrio's avatar
GabrielLyrio
New Member
1 year ago
Solved

Filtering Map Events by Active Date Range Using Start and End Dates in Power BI

I'm using a scatter chart to pinpoint events in a map using X and Y Axis, but the probem i'm running into is that these events have two important dates, the initial and ending dates, wich I'd like to...
  • v-kpoloju-msft's avatar
    v-kpoloju-msft
    1 year ago

    Hi GabrielLyrio,

    Thank you for the follow-up and for sharing the specific error you're encountering:

    "It is not possible to determine a single value for the ''Event Date'' column..."

    This error typically arises when a measure is employed in a context where Power BI expects a single row-level value, but the expression returns multiple rows without an aggregation function like MIN, MAX, etc. Measures are context-sensitive and designed to aggregate, so they won't return one value per row as a calculated column does.

    Regarding the Scatter Chart: The Scatter Chart visual requires well-defined numeric X and Y values for each data point. If you aim to plot events based on specific dates (or a single date per event), a measure won't work directly unless it has been properly aggregated. For example:

    Event Date (Max) = MAX('FORMULARIO REPARACAO'[Event Date])


    However, this approach is only viable if aggregating the data is acceptable. If row-level event data is essential, I suggest the following:

    Utilize a Calculated Column (if your model supports it) to extract or transform the event date for each row, allowing you to have a single, fixed value. For example:

    Single Event Date = 'FORMULARIO REPARACAO'[Event Date]


    In this case, the scatter chart can use this field directly. However, if you're aiming to plot start and end dates for events and represent durations or intervals, a scatter chart may not be the most suitable visual.

    Consider these alternative visuals:

    • Gantt Chart (custom visual) – Ideal for plotting event durations using start and end dates.
    • Timeline or Line Chart – Useful for displaying events over time and highlighting values.
    • Matrix/Table visual – Effective for listing events with calculated measures, especially if interactivity is required. You can explore custom visuals via the Power BI Visuals Marketplace.

    Please provide more details about your expected outcome (e.g., are you trying to show start vs. end dates per event? Duration? Categorized scatter?), and I’d be happy to tailor a solution or share a PBIX sample if needed.

     

    If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

    Thank you for using Microsoft Community Forum.