skip to main content
Power BI
    • What is Power BI
    • Why Power BI
    • Customer stories
    • Data visuals
    • Security
    • Power BI Desktop
    • Power BI Pro
    • Power BI Premium
    • Power BI Mobile
    • Power BI Embedded
    • Power BI Report Server
  • Pricing
    • Azure + Power BI
    • Office 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Overview
    • Find consulting services
    • Partner showcase
    • Find a partner
    • Become a partner
    • Instructor-led training
    • Getting started
      • Overview
      • Online workshops
      • Self-guided learning
      • Webinars
      • Documentation
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Business intelligence topics
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Galleries
    • Community Connections & How-To Videos
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power BI Community
    • Galleries
    • Data Stories Gallery
    • Deneb Facet Cross-Filtering Demo: A Field Guide to...

    Deneb Facet Cross-Filtering Demo: A Field Guide to Red and Blue America

    11-09-2021 18:28 PM - last edited 11-09-2021 18:54 PM

    Super User dm-p
    Super User
    1682 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    dm-p
    Super User dm-p
    Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    Deneb Facet Cross-Filtering Demo: A Field Guide to Red and Blue America

    ‎11-09-2021 06:28 PM

    This started as an experiment with the Deneb custom visual, to see how well the Vega-Lite's faceting functionality worked with the dataset behind the main visual by Randy Yeip, Stuart A. Thompson and Will Welch in this Wall Street Journal article on the 2016 US election.

    Once I wired-up the base visual (and the legend visual explaining the PVI Score, which also uses Deneb), I started to think about how well cross-filtering integration may work at both the data point and the facet level, so did a bit more work to illustrate that the matrix in the same page could be cross-filtered accordingly (or through a combination of either, plus multi-selection with the Ctrl key).

    Bookmarks were then added, to illustrate that selection state can also be saved and recalled, so this opens up storytelling potential a little further.

    The core visual is a single Deneb/Vega-Lite specification, using the following fields:

    • State: the column we want to facet by
    • MapX: the x-coordinate of the state
    • MapY: The y-coordinate of the state
    • Year: the election year, and series of the x-axis for each facet chart (format : 'YY)
    • Year Sort: a column added during transformation to ensure that years sort nicely (note that Vega-Lite does let us prescribe a manual sort order, but this simplifies the data-driving of such a field)
    • Inclination: how Replublican or Democratic each state is for a given election year
    • PVI Score: the partisan voter index (how much the inclination leans relative to the nation overall) 

    As .json files can't be attached to Data Stories, the Deneb template is available in this Gist (or can be inspected/modified in the attached workbook).

     

    eyJrIjoiZjgwYTJiZDktMDY1YS00ZjM1LWEwZWUtM2FkOTU3ZWYzOWYxIiwidCI6IjUzYmJlMGQ3LTU0NzItNGQ0NS04NGY0LWJiNzJiYjFjMjI4OSJ9





    Did I answer your question? Mark my post as a solution!

    Proud to be a Super User!


    My course: Introduction to Developing Power BI Visuals


    On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




    Deneb - A Field Guide to Red and Blue America.pbix
    Labels:
    • Labels:
    • Government
    • How To
    Message 1 of 2
    1,682 Views
    8
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    Icad01
    Icad01 Kudo Collector
    Kudo Collector
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎11-10-2021 01:08 PM

    Nice work.
    Thanks for sharing 🙂

    Message 2 of 2
    1,428 Views
    0
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Automate
    • Power Virtual Agents

    • Sign in
    • Sign up

    Browse

    • Solutions
    • Partners
    • Consulting Services

    Downloads

    • Power BI Desktop
    • Power BI Mobile
    • Power BI Report Server
    • See all downloads

    Learn

    • Guided learning
    • Documentation
    • Support
    • Community
    • Give feedback
    • Webinars
    • Developers
    • Blog
    • Newsletter

    © 2022 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks