Forum Discussion

Mahadevaraobc's avatar
Mahadevaraobc
Helper II
7 years ago

Filter and Sum Values

Hi, Iam new to Power BI DAX and have few issues which might be easy..Not sure to use measure or column please help

 

I have a dataset which has Month Column (ColumnA) and some values in different column (ColumnB)

1) I want to sum values in ColumnB related only to particular month and count no of rows in ColumnA and divide ColumnB sum by ColumnA rowcount.

1 Reply

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Something like this should work:

     

    Measure = 
    VAR __sum = SUM([Column1])
    VAR __count = COUNTX('Table2',[Month])
    RETURN
    DIVIDE(__sum,__count,0)

    See Page 4, Table2 of attached.