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
    • Microsoft 365 + Power BI
    • Dynamics 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Getting started
      • Overview
      • 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
    • Microsoft Power BI Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power BI
    • Desktop
    • Service
    • Report Server
    • Power Query
    • Mobile Apps
    • Developer
    • DAX Commands and Tips
    • Custom Visuals Development Discussion
    • Health and Life Sciences
    • Power BI Spanish Community
    • Translated Spanish Desktop
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Training and Consulting
    • Instructor Led Training
    • 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
    • Events
    • Ideas
    • Custom Visuals Ideas
    • Issues
    • Issues
    • Events
    • Upcoming Events
    • Community Engagement
    • T-Shirt Design Challenge 2023
    • Community Blog
    • Power BI Community Blog
    • Custom Visuals Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    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
    • Quick Measures Gallery
    • Arrow Rating

    Arrow Rating

    08-15-2017 03:11 AM - last edited 08-15-2017 03:29 AM

    Anonymous
    Not applicable
    18257 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Arrow Rating

    ‎08-15-2017 03:11 AM

    NAME:

    Arrow Rating

     

    DESCRIPTION:

    This quick measure shows an up arrow or down arrow when comparing a target value against a target value, or else "--" if not. Can also be inverted if a lower value is better compared to the target.

     

    PARAMETERS:

    Name: Base Value

    Tooltip: Your base value / measure.

    Type: Numerical field / measure

     

    Name: Target

    Tooltip: The value / field you wish to compare base value against.

    Type: Numerical field / measure

     

    Name: Inverted

    Tooltip: Toggle whether lower value is better compared to the target.

    Type: True / False

     

    DAX: 

    Arrow Rating =
    VAR __BASE_VALUE = [Current Month] -- Set Variable for Value
    VAR __TARGET = [Previous Month] -- Set Variable for Target
    VAR __INVERT = FALSE -- Toggle Whether You Want To Invert The Result (i.e. Lower or Higher = Better)

    RETURN
        SWITCH (
            __INVERT,
            -- SWITCH Value to Check
            FALSE, IF (
                __BASE_VALUE > __TARGET,
                UNICHAR ( 9650 ),
                IF ( __BASE_VALUE < __TARGET, UNICHAR ( 9660 ), "--" )
            ),
            -- If INVERT Variable is TRUE, Compare BASE_VALUE Variable Against TARGET Variable,   Higher = Up Arrow, Lower = Down Arrow, Else --
            TRUE, IF (
                __BASE_VALUE > __TARGET,
                UNICHAR ( 9660 ),
                IF ( __BASE_VALUE < __TARGET, UNICHAR ( 9650 ), "--" )
            )
        )

     

     

    NOTES:

    A simple measure created with the UNICHAR function which was introduced to me by Chris Webb's quick measure and blog, so a big thanks to him. The measure uses some simple IF logic, making use of the switch function also. Using Chris's quick measure has encouraged my use of variables within DAX so I hope this can create some value to some people. 

     

    This quick measure would also benefit from conditional formatting (red or green for good or bad) however currently this is only applicable to numerical fields currently. 

     

    Thanks all!

     

    Gordon

     

     

    eyJrIjoiYTMwZjQ5Y2QtOTU4MC00ZWViLWFmZWItYWE2MjkyMWMxNjcxIiwidCI6ImRkYzVlNDUwLTM5NzUtNDEzOC05N2M4LTQxN2U4MmVmYWIyNSIsImMiOjh9

    Preview file
    14 KB
    Arrow Rating.pbix
    Labels:
    • Labels:
    • Other
    Message 1 of 3
    18,257 Views
    10
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    jeffgarlisch
    jeffgarlisch Helper I
    Helper I
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-04-2018 10:30 AM

    This is great! Thanks for contributing, is it possible to change the colors of the arrows?

    Message 2 of 3
    16,212 Views
    0
    Reply
    Anonymous
    Not applicable
    In response to jeffgarlisch
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    ‎09-07-2018 06:34 AM

    Yes. You can change the colour of the arrow on the format section.

    Message 3 of 3
    16,171 Views
    0
    Reply

    Power Platform

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

    • Sign in
    • Sign up

    Browse

    • Solutions
    • 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

    © 2023 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks
    Consumer Privacy Act (CCPA) Opt-Out Icon Your Privacy Choices