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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
arnabmit
Helper I
Helper I

Convert yearly target to monthly target

I have a Target table with the following columns (with sample value):

ID (abc123)

Name (abc xyz)

Year (2021)

Target ($120,000)

 

I need a table which will give me monthly target (yearly target / 12)

ID (abc123) (abc123) (abc123) ...

Name (abc xyz) (abc xyz) (abc xyz) ...

Date (1/1/2021) (2/1/2021) (3/1/2021) ...

Target ($10,000) ($10,000) ($10,000) ...

 

I was thinking of creating the (yearly target / 12) value then merging a month column with the target table, but it is not working for me.

 

Any guidance will be greatly appreciated. Either a power query or a dax solution will do.

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @arnabmit ,

Test the below :

create a date table:

date = CALENDAR("2021,1,1","2021,12,31")

new column:

date = CALENDAR("2021,1,1","2021,12,31")
year = YEAR('date'[Date])

Then create relationship:

vluwangmsft_0-1652170958424.png

And create new column:

disvalue = 'Table'[Target ]/ CALCULATE(DISTINCTCOUNT('date'[month]),FILTER('date','date'[year]=MAX('Table'[Year])))

vluwangmsft_1-1652171007278.png

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


Best Regards

Lucien

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @arnabmit ,

Test the below :

create a date table:

date = CALENDAR("2021,1,1","2021,12,31")

new column:

date = CALENDAR("2021,1,1","2021,12,31")
year = YEAR('date'[Date])

Then create relationship:

vluwangmsft_0-1652170958424.png

And create new column:

disvalue = 'Table'[Target ]/ CALCULATE(DISTINCTCOUNT('date'[month]),FILTER('date','date'[year]=MAX('Table'[Year])))

vluwangmsft_1-1652171007278.png

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


Best Regards

Lucien

amitchandak
Super User
Super User

@arnabmit , check if these two can help

 

In this one, you can change logic from day month

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

 

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...

 

 

Thanks for your reply, however I couldn't understand how to use this logic in my requirement.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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