Forum Discussion

littlemojopuppy's avatar
littlemojopuppy
Community Champion
6 years ago
Solved

Stumped! Get Row Header Value

Hi!  Would like to ask for some help with something.  I'm trying to implement logic to handle data with different granularities, with one exception...the result isn't a measure.  It's hard coded base...
  • littlemojopuppy's avatar
    littlemojopuppy
    6 years ago

    Good morning!

     

    I took a look at the article...did not help.  Because it's a date hierarchy, date is always being filtered so the ISFILTERED test is always true.  Was thinking about it over the weekend, and decided to try the following and it worked exactly as intended.

    Targets = 
        IF(
            ISINSCOPE('Calendar'[Date]),
            BLANK(),
            IF(
                ISINSCOPE('Calendar'[MonthName]),
                SWITCH(
                    TRUE(),
                    AND(
                        SELECTEDVALUE('Calendar'[Year]) = 2020,
                        SELECTEDVALUE('Calendar'[MonthNumber]) = 4
                    ), 796,
    
    Etc...


    But thank you for the suggestion!