Forum Discussion

AlakarHarijan1's avatar
AlakarHarijan1
Frequent Visitor
7 years ago
Solved

How to remove blank rows in a calculated table With Summarize on one of the column ?

Hi Bro,    Have made a calculated table with the below code.   mySales = FILTER ( DISTINCT ( SELECTCOLUMNS ( Sales, "ProductID", Sales[ProductID], "Amount", Sales[Amount] ) ), ...
  • TeigeGao's avatar
    7 years ago

    Hi AlakarHarijan1 ,

    We can use the SUMMARIZE() function to summarize one of the column, actually, in your scenario, we can combine the FILTER() and SUMMARIZE() in a query like below:

    Assume that we have a table like below:

    Then we can use the following query:

    Table =
    SUMMARIZE (
        FILTER ( Sales, Sales[Amount] <> BLANK () ),
        Sales[ProductID],
        "Amount", SUM ( Sales[Amount] )
    )

    The result will like below: 

    Best Regards,

    Teige