Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
AlakarHarijan1
Frequent Visitor

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.

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution 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:

PBIDesktop_RFQuY9yTFo.png

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: 

PBIDesktop_0CB3hFYtH9.png

Best Regards,

Teige

View solution in original post

2 REPLIES 2
AlakarHarijan1
Frequent Visitor

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.

TeigeGao
Solution Sage
Solution 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:

PBIDesktop_RFQuY9yTFo.png

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: 

PBIDesktop_0CB3hFYtH9.png

Best Regards,

Teige

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.