Forum Discussion

RootOfMinusOne's avatar
RootOfMinusOne
Frequent Visitor
4 years ago
Solved

Get Filtercontext of Visual when value is missing

Hi   Is there a way to get the filtercontext of a cell in a Matrix Visual, even if  there is no value for that  cell in the fact table?   Example, I have a table called "Data" with columns Rank, ...
  • BarnabasToth's avatar
    4 years ago

    You can use this measure instead: 

    Color formatting = 
    VAR DepartmentFilters = FILTERS ( Data[Department] )
    VAR RankFilters = FILTERS ( Data[Rank] )
    RETURN
    CALCULATE (
        MAX( Colors[Color] ),
        TREATAS( DepartmentFilters, Colors[Department] ),
        TREATAS( RankFilters, Colors[Rank] )
    )

    Download the sample file here

    This article is really helpful for a scenario you described.

    Mark this answer a solution if it resolved your issue.

    Regards