Forum Discussion

aellison's avatar
aellison
Helper I
8 years ago
Solved

DAX pivot counts with exception

  I am trying to perform counts based on number of days that a store has no safety incidents. The first list shows the store names, the date, and the number of times they reported Safe (No Incidents...
  • BILASolution's avatar
    8 years ago

    Hi aellison

     

    Try this measure...

     

    Ind Safe = 
    SUMX (
        SUMMARIZE (
            Safe;
            Safe[StoreName];
            Safe[Date];
            "Ind Safe"; PRODUCT ( Safe[Safe] )
        );
        [Ind Safe]
    )

    Or

     

    Ind Safe = 
    SUMX (
        SUMMARIZE (
            Safe;
            Safe[StoreName];
            Safe[Date];
            "Ind Safe"; IF(PRODUCT(Safe[Safe]) =0;BLANK();PRODUCT(Safe[Safe]))
        );
        [Ind Safe]
    )

    The matrix looks like...

     

     

     

    Regards

    BILASolution