Forum Discussion

rbowen's avatar
rbowen
Helper III
7 months ago
Solved

Using Range of Values with SWITCH(TRUE Function

Greetings All -    Acknowlegement: Yes, I could probably do this using Cell Elements and using a function to define font colors and icons, however, I'm experimenting with using unicharacters becaus...
  • SavioFerraz's avatar
    7 months ago

    Hi rbowen,

    In DAX, you must define ranges using logical operators (&&) and remember that percentages are decimal values (50% = 0.5). Your middle condition should be written like this:

    _perc >= 0 && _perc < 0.5

    That will fix the syntax error and correctly evaluate the range inside SWITCH(TRUE()).

     

    Savio Ferraz | Microsoft Learning Consulting | Google Certified Trainer and Microsoft Certified Educator

    Did my answer help? Mark my post as a solution or like it if you found it useful.