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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Rabi
Resolver I
Resolver I

Translating pay ending date into individual or daily date

Hi Everyone

 

I have a table like this which i want to translate as table below. I do have a table that has individual date and pay ending date

Initial Table
Locationpay ending datevalue
Location15/01/2025200

 

Achieve below

Achieve this in a new table  
LocationDatevalue
Location2/01/202514.28571
Location3/01/202514.28571
Location4/01/202514.28571
Location5/01/202514.28571
Location6/01/202514.28571
Location7/01/202514.28571
Location8/01/202514.28571
Location9/01/202514.28571
Location10/01/202514.28571
Location11/01/202514.28571
Location12/01/202514.28571
Location13/01/202514.28571
Location14/01/202514.28571
Location15/01/202514.28571
  200 (True)

 

 

Thanks !!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below, and hard-coded the start date = January 02nd 

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1747105073923.png

 

expected result table = 
	VAR _calendar = ADDCOLUMNS(
		CALENDAR(
			DATE(YEAR(MIN(data[pay ending date])), 1, 1),
			DATE(YEAR(MAX(data[pay ending date])), 12, 31)
		),
		"Year", YEAR([Date]),
		"Month number", MONTH([Date]),
		"Day of month", DAY([Date])
	)
	VAR _t = GENERATE(
		data,
		FILTER(
			_calendar,
			[Year] = YEAR(data[pay ending date]) && [Month number] >= 1 && [Month number] <= MONTH(data[pay ending date]) && [Day of month] >= 2 && [Day of month] <= DAY(data[pay ending date])
		)
	)
	VAR _average = ADDCOLUMNS(
		ADDCOLUMNS(
			_t,
			"@rowcount", COUNTROWS(FILTER(
				_t,
				data[Location] = EARLIER(data[Location])
			))
		),
		"@value", FORMAT(
			DIVIDE(
				data[value],
				[@rowcount]
			),
			"#,#0.00000"
		)
	)
	RETURN
		SUMMARIZE(
			_average,
			data[Location],
			[Date],
			[@value]
		)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

2 REPLIES 2
v-sgandrathi
Community Support
Community Support

Hi @Rabi,

 

Has your issue been resolved?If the response provided by the community member addressed your query, could you please confirm? It helps us ensure that the solutions provided are effective and beneficial for everyone.

If yes, kindly accept the useful reply as a solution and give us Kudos. It would be appreciated.

 

Thank you for your understanding!

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below, and hard-coded the start date = January 02nd 

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1747105073923.png

 

expected result table = 
	VAR _calendar = ADDCOLUMNS(
		CALENDAR(
			DATE(YEAR(MIN(data[pay ending date])), 1, 1),
			DATE(YEAR(MAX(data[pay ending date])), 12, 31)
		),
		"Year", YEAR([Date]),
		"Month number", MONTH([Date]),
		"Day of month", DAY([Date])
	)
	VAR _t = GENERATE(
		data,
		FILTER(
			_calendar,
			[Year] = YEAR(data[pay ending date]) && [Month number] >= 1 && [Month number] <= MONTH(data[pay ending date]) && [Day of month] >= 2 && [Day of month] <= DAY(data[pay ending date])
		)
	)
	VAR _average = ADDCOLUMNS(
		ADDCOLUMNS(
			_t,
			"@rowcount", COUNTROWS(FILTER(
				_t,
				data[Location] = EARLIER(data[Location])
			))
		),
		"@value", FORMAT(
			DIVIDE(
				data[value],
				[@rowcount]
			),
			"#,#0.00000"
		)
	)
	RETURN
		SUMMARIZE(
			_average,
			data[Location],
			[Date],
			[@value]
		)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.