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
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
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

Something like this...may be

 

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

 

 


Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

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

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?

 

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?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

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

 

 

Hi,

 

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


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.

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.