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

How to add planed YTD on a chart?

Hi,

I have a chart as below where I want to show PLAN, Actual, YTD along with 2014 - 2015 (YTD). So I have used below query

Sum({<Year = {'2014', '2015' }>}[Actual SPCD hit rate_CUTTING]/12)

1. is the query is right?

2. If that so, I don't want to show 0% I just want to show the line only where there is a value how do I do that?

Eg: Line only on top of Jan, Feb and Mar

Chart.png

1 Solution

Accepted Solutions
Not applicable
Author

correct answers

1. RangeAvg( above( avg([Actual GRN Hit Rate_STORES]),0,12) )

2. =avg({<Year={'$(vPriorYear)'} ,Month=,Day=,Date={'<=$(vYear)'}, MonthYear=>}[Actual GRN Hit Rate_STORES])

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Not clear from your question.... can you elaborate little more with sample file or apps?

Not applicable
Author

1. If I want to know YTD following query "avg([Actual SPCD hit rate_CUTTING]/12)" is right?

2. If I want to know YTD of 2015 following query "Sum({<Year = {'2014', '2015' }>}[Actual SPCD hit rate_CUTTING]/12)" is right?

3. guess you can see the pink line one the char there I don't won't the pink line to 0% I want only if there is an value, how do I do that? 

MK_QSL
MVP
MVP

Still not clear.. Can you provide sample data please ?

Anonymous
Not applicable
Author

try:

If(Sum({<Year = {'2014', '2015' }>}[Actual SPCD hit rate_CUTTING]/12) > 0

     ,Sum({<Year = {'2014', '2015' }>}[Actual SPCD hit rate_CUTTING]/12)

     , Nul()

)

Not applicable
Author

correct answers

1. RangeAvg( above( avg([Actual GRN Hit Rate_STORES]),0,12) )

2. =avg({<Year={'$(vPriorYear)'} ,Month=,Day=,Date={'<=$(vYear)'}, MonthYear=>}[Actual GRN Hit Rate_STORES])