Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Advanced Filtering for Cumulative values

Hi Everyone,    I have a problem with a cumulative measure. Would appreciate if someone could help.   My columns are: "Account ID" - unique for every account and can be found through multiple d...
  • MFelix's avatar
    MFelix
    5 years ago

    Hi Anonymous ,

     

    I believe that you need to do a condittional formatting measure to make this happen. In this case I have created a calendar table and the following measures:

    cumulative value =
    CALCULATE (
        SUM ( 'Table'[Charge] ),
        FILTER ( ALL ( 'calendar' ), 'calendar'[Date] <= MAX ( 'calendar'[Date] ) )
    )
    
    
    Formattingbystatus =
    SWITCH (
        SELECTCOLUMNS (
            TOPN (
                1,
                FILTER (
                    ALL ( 'Table'[Status], 'Table'[Date] ),
                    'Table'[Date] <= MAX ( 'calendar'[Date] )
                ),
                'Table'[Date], DESC
            ),
            "DDD", 'Table'[Status]
        ),
        "POCI - NPE", "Red",
        "POCI - PE", "Yellow"
    )

     

     

    Now if you use the condittional formatting you will get the following result:

    You need to add on the second measure a color for each of the status you have in this example you only share two.

    Check PBIX file attach.