Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Aggregate value from a measure

Hi all,   I made a calculated measure that gives me a threshold for the status of our machines:  Threshold Audit = SWITCH(TRUE(),[DateDiff Last Audit]<=14,"Green", [DateDiff Last Audit]<=39,"Am...
  • sturlaws's avatar
    sturlaws
    6 years ago

    Hi Anonymous 

     

    you will have to create a separate measure for each status. I have not tested it against Hana, but it works with MS SSAS:

    Amber =
    COUNTROWS (
        CALCULATETABLE (
            VALUES ( 'yourTable'[MachineID] ),
            FILTER ( 'yourTable', [DateDiff Last Audit] > 14 && [DateDiff Last Audit] > 39 )
        )
    )
    

     

    Cheers,
    Sturla

    If this post helps, then please consider Accepting it as the solution. Kudos are nice too.