cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

YTD Month count to create moving target

I have seen simular questions, however it is still not working the way I want.

 

I would like to create a measure that devides my target by 12 and grows by the number of months.

Than when I put it in a bar chart together with my actual data it will show the difference. Like in the picture below:

 

Schermafbeelding 2018-01-12 om 10.32.26.png

 

So if the target is "1200" and today is "13 March" the target will show "300"

 

 

 

7 REPLIES 7
Super User
Super User

Re: YTD Month count to create moving target

@Anonymous

 

Something like this...may be

 

Measure =
VAR Target = 1200
RETURN
    Target * MONTH ( SELECTEDVALUE ( Table1[Date] ) )
        / 12

 

 

Anonymous
Not applicable

Re: YTD Month count to create moving target

Hi @Zubair_Muhammad

Thank you very much for your reply

 

I don't really get what you mean, because the formula is not working.

 

Besides I have the target 1200 already in a table:

 

Person       Catogary       Target           |           Calculated column

Person A      A                   1200             |                300

Person A      B                   1400              |               117

Person B      A                   800                |               67

Person B      B                   1400              |               117

 

Maybe it would be better to make a calculated column as shown above. In this example it is still March

How would I do that?

Anonymous
Not applicable

Re: YTD Month count to create moving target

I have been trying some things and came to the following formula:

 

YTD Target = ('Table'[Target]/12)*MONTH(TODAY())

And it shows the right values. So according to the sample above the value shows (given the fact it is januari now):

 

Person       Catogary       Target           |           Calculated column

Person A      A                   1200             |                100

Person A      B                   1400              |               116,66

Person B      A                   800                |               66,66

Person B      B                   1400              |               116,66

 

 

However, I am not sure if in february the column will change to:

200

233,33

133,33

233,33

 

Is there a way I can check this? Or does anyone know if this is the right formula to get the desired result?

 

Interkoubess Established Member
Established Member

Re: YTD Month count to create moving target

Hi @Anonymous,

 

Please link a date to your target and add a date table to your model and then you can compute easily a formula to create YTD.

 

Let us know if it not what you desire...

 

 

Ninter.

Super User
Super User

Re: YTD Month count to create moving target

Hi,

 

Your formula should ideally be a measure (not a calculated column formula).  It will be ideal to have a date column in your base data.  Do you not have that?  Also, what do you wnat to show on the X-axis?

Anonymous
Not applicable

Re: YTD Month count to create moving target

Hi @Ashish_Mathur

 

Thanks for your reply.

 

I do have a seperate calander table. What do you mean with a date column?

 

On the X-axis I want to show the reason of visit as discussed in this topic: Create column filled with measures

 

 

Super User
Super User

Re: YTD Month count to create moving target

Hi,

 

Your formula should work.  Write that as a measure though instead of a calculated column formula.