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
hedin123
Frequent Visitor

Distributing value equally between months

Hello all! 

I am currently doing a dashboard for budgetting. I want to see the budget each month. The problem is that the budget comes in the format as  01/01/year. So now it's only "January" each time. So now I want to distribute this data 1/12*value month by month. Is there any easy way to transform the data to do this?  See picture below. 

Thanks in advance! 😄 

 

 

Question.PNG

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @hedin123  ,

Is the result up to your expectation

Here are the steps you can follow:

1. Create calculated column.

12/1 =
var _1=CALCULATE(SUM('Table (3)'[value]),FILTER('Table (3)',YEAR('Table (3)'[dato])=YEAR(EARLIER('Table (3)'[dato]))&&MONTH('Table (3)'[dato])=MONTH(EARLIER('Table (3)'[dato]))))
return
DIVIDE(_1,12)
Column 2 = YEAR('Table (3)'[dato])&"-"&MONTH('Table (3)'[dato])&"-"&'Table (3)'[12/1]

2. Result.

v-yangliu-msft_0-1614214746536.png

 

You can downloaded PBIX file from here.

 

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.

Hello @v-yangliu-msft  and thanks for your answer! 😄 

maybe my formulation was wrong. What I want to is for each value, for instance Wednesday 1. January  has a value of 427 when dividing by 12. I want to put this value on january, february, march... to december. so that i can plot months.

Hi  @hedin123  ,

Create data:

v-yangliu-msft_0-1614320188177.png

Here are the steps you can follow:

1. Create calculated column.

Measure =
var _avg=CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),YEAR('Table'[dato])=YEAR(MAX('Table'[dato]))&&MONTH('Table'[dato])=1))
var _divide=DIVIDE(_avg,12)
return
IF(YEAR(MAX('Table'[dato]))=YEAR(MAX('Table'[dato])),_divide,_divide)

2. Result.

v-yangliu-msft_1-1614320188185.png

Is the result in line with your expectations

You can downloaded PBIX file from here.

 

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.

Portrek
Resolver III
Resolver III

Hello,

 

You can inside the query, click in the column and select the Split Columns and then select By Delimiter option.

 

After that, put comma ( ,) and last choose the date format.

 

See you !

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.