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
IF
Post Prodigy
Post Prodigy

List

Hi,

 

I have data for the year but it is the same for each month:

 

Unit2021
A12
B14
C16
D18

 

Based on this data, I would like to add a column "month" from 01.2021 to 12.2021 and include the same value for each unit. There should be 48 rows in this example such as:

 

UnitMonthValue
A01.202112
A02.202112
A03.202112
A04.202112
A05.202112
A06.202112
A07.202112
A08.202112
A09.202112
A10.202112
A11.202112
A12.202112
B01.202114
B02.202114
B03.202114
......

 

Could I do it?

Thanks in advance.

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@IF , I have two codes to see if that can help. Do not distribute

 

Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-C...

 

Distributing/Allocating the Yearly Target(Convert to Daily Target): https://community.powerbi.com/t5/Community-Blog/Distributing-Allocating-the-Yearly-Target-Convert-to...

 

Both convert to dailt, you can convert to monthly

 

View solution in original post

v-xiaotang
Community Support
Community Support

Hi @IF 

1. create the table,

vxiaotang_0-1632744782059.png

2. create a new table by using function CROSSJOIN

NewTable = CROSSJOIN('Table1',Table2)

vxiaotang_1-1632744891747.png

result

vxiaotang_2-1632744929764.png

 

 

Best Regards,

Community Support Team _Tang

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

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @IF 

1. create the table,

vxiaotang_0-1632744782059.png

2. create a new table by using function CROSSJOIN

NewTable = CROSSJOIN('Table1',Table2)

vxiaotang_1-1632744891747.png

result

vxiaotang_2-1632744929764.png

 

 

Best Regards,

Community Support Team _Tang

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

amitchandak
Super User
Super User

@IF , I have two codes to see if that can help. Do not distribute

 

Distributing/Allocating the Yearly Target(Convert to Daily Target): Measure ( Daily/YTD): Magic of CLOSINGBALANCEYEAR With TOTALYTD/DATESYTD: https://community.powerbi.com/t5/Community-Blog/Power-BI-Distributing-Allocating-the-Yearly-Target-C...

 

Distributing/Allocating the Yearly Target(Convert to Daily Target): https://community.powerbi.com/t5/Community-Blog/Distributing-Allocating-the-Yearly-Target-Convert-to...

 

Both convert to dailt, you can convert to monthly

 

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.