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] )
    ),
    NOT ( ISBLANK ( [Amount] ) )
)

 

After making the custom table i just want to summarize one of the column, can you please help me on this.

 

Thank you so much.

  • 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

2 Replies

  • TeigeGao's avatar
    TeigeGao
    Icon for Solution Sage rankSolution Sage

    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

  • Hi All,

    I have two tables Table1 and Table2.

    Table1 gets refreshed everyday and this refreshed data should append to Table2 on daily basis.

    for eg. Table2 already has 10 rows today. Table1 refreshes and this data should append to the 11th row in Table2 and now Table2 will have 20 rows.

    The next day again Table1 refreshes and the new data should append to Table2 but from 21st row.

    Is this possible, and if yes the please help me with it.

     

    Thank you.