Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Power bi - Average

Hi - I have the following data in the "First table" that Distinct-counts items. The data is based on items shown in the "Second table". As you can see in the "Second table" there are itemes with $0 v...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    Please try below steps:

    1. below is my test table

    Table:

    2. create a measure with below dax formula

    Sumifs =
    VAR cur_month =
        SELECTEDVALUE ( 'Table'[Month] )
    VAR cur_wo =
        SELECTEDVALUE ( 'Table'[WO#2] )
    VAR tmp =
        FILTER ( ALL ( 'Table' ), 'Table'[Month] = cur_month && 'Table'[WO#2] = cur_wo )
    RETURN
        SUMX ( tmp, [Total2] )
    

    3. add a table visual with fields and measure

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.