# Calculated Table vs. Measure

Hello Experts,

@deltaselect

I have done calculation by Calculated table but I was wondering if I can achieve the same with measures? Is it possible?

Here is the problem statement:

I have an excel file as a data source. And I want to:

Summarize : HandQuantity (Sum and Average)
Per Day
Per product description
Per order number.

I am able to do it with the help of Calculated Table.

``````Calculated Table =
VAR Calc =
SUMMARIZECOLUMNS(
'Sheet1'[ManufactureDate].[Date],
Sheet1[ProductDescription],
Sheet1[OrderID],
)
Return  Calc
``````

`

I think by using Calculated table, I am cheating. Attached above is the file.

-RK

Hi @rit372002 ,

As far as I can see, in this example, basic measures works fine, and are better to use as a calculated table, as you are only using one dimension QTY.

For your example report it is sufficient to use SUM and Average, as the data is reported from only one column “HandAddQuantity”, then AverageX and SumX are not needed.

With the measures above, I was able to reproduce your report.

Kind regards, JW

Thanks! Didn’t realized it’s going to be that easy. That bags just one more question : If I had to add one more column you mentioned I needed Sumx Or Averagex. Can you enlighten me on that? Say, if I had to add “Quantity” for sum and average then I needed SumX or AverageX?

Thanks again for help,
-RK

Hi @rit372002 ,

SumX and AverageX are (table-)row calculations, and are to be used for example to calculate costs or sales using a combination of QTY and Price, see below.

You may look attached video for a more detailed explanation.