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
      • 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
      • Overview
      • Guided learning
      • Documentation
      • Webinars
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign In
    • ·
    • Help
    Go To
    • Galleries
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • MBAS Gallery
    • MBAS Gallery 2020
    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
    • Re: Arrow Rating

    Re: Arrow Rating

    09-07-2018 06:34 AM

    Anonymous
    Not applicable
    11039 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    Flash_BI
    Flash_BI Advocate I
    Advocate I
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • 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
    13,125 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
    • Email to a Friend
    • 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
    11,080 Views
    0
    Reply
    Anonymous
    Not applicable
    In response to jeffgarlisch
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • 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
    11,039 Views
    0
    Reply
    Preview Exit Preview

    never-displayed

    You must be signed in to add attachments

    never-displayed

    Additional options
    You do not have permission to remove this product association.
     

    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

    • © 2021 Microsoft
    • Follow Power BI
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks