Forum Discussion

hejszyszky's avatar
hejszyszky
Helper II
4 years ago
Solved

Exclude multiple values from calculated column

Hi,  Given code and output below, id like to exclude multiple values based on date and name. IF I have more than one row of same Date&Name id like to output calculation (330) only in one row.    ...
  • v-luwang-msft's avatar
    4 years ago

    Hi hejszyszky ,

    Since I do not have your specific data, I have created a template data based on what you have provided so far:

     

    Then use the below dax to create a new column:

    final = 
    VAR index11 =
        RANKX (
            FILTER ( 'Summarized Raport', 'Summarized Raport'[Data] = EARLIER ( 'Summarized Raport'[Data] ) ),
            'Summarized Raport'[Zmiana(A,B,C,D)],
            ,
            ASC
        )
    RETURN
        IF (
            index11 = 1,
            SUMX (
                FILTER ( 'Summarized Raport', 'Summarized Raport'[Data] = EARLIER ( 'Summarized Raport'[Data] ) ),
                'Summarized Raport'[value]
            ),
            0
        )
    

    Final output:

    You can adapt my code to your specific environment and needs.

     

     

    Did I answer your question? Mark my post as a solution!


    Best Regards

    Lucien