cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Anonymous
Not applicable

## How to creat a new table have all of columns from the value of a column of another table

Hi Eveyon

I am new and i speak english not well.

Pls help me for this case:

I have table name: "NL_TH"

So, I want creat new table as below

I cannot user pivot and unpivot because Table :NL_TH is not original data .

Thank for help

1 ACCEPTED SOLUTION
Community Support

Hi  @Anonymous ,

Here are the steps you can follow：

1. Create calculated table.

``````Table =
SUMMARIZE('NL_TH',NL_TH[month])``````

2. Create calculated column.

``````A =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="A"&&'NL_TH'[month]=EARLIER('Table'[month])))``````
``````B =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="B"&&'NL_TH'[month]=EARLIER('Table'[month])))``````
``C = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="C"&&'NL_TH'[month]=EARLIER('Table'[month])))``
``D = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="D"&&'NL_TH'[month]=EARLIER('Table'[month])))``

3. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Anonymous
Not applicable

Thanks for help

Community Support

Hi  @Anonymous ,

Here are the steps you can follow：

1. Create calculated table.

``````Table =
SUMMARIZE('NL_TH',NL_TH[month])``````

2. Create calculated column.

``````A =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="A"&&'NL_TH'[month]=EARLIER('Table'[month])))``````
``````B =
CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="B"&&'NL_TH'[month]=EARLIER('Table'[month])))``````
``C = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="C"&&'NL_TH'[month]=EARLIER('Table'[month])))``
``D = CALCULATE(SUM('NL_TH'[value]),FILTER('NL_TH','NL_TH'[DONVI]="D"&&'NL_TH'[month]=EARLIER('Table'[month])))``

3. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Super User

@Anonymous

have you tried to use matrix to display this?

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.