excel - PowerPivot - How to calculate trend by comparing two periods? -


i'would create kpi compare results 2 periods.

my data source looks following example :

user | nb sales | date bob  | 10       | 01/01/2014 tim  | 20       | 01/01/2014 bob  | 5        | 01/02/2014 ... 

so compare number of sales current previous week. don't know how process it.

= calculate(sum('sales [nb sales]'), weeknum('sales [date]') = ) 

i seen on microsoft there dax function parallelperiod() compare periods don't know if should use it.

should use formula calculated column or calculated value (bottom part).

this kpi should indicate if employee sold more or less products previous week.

thanks,

i handle in 3 measures:

[sales] = sum(sales[nb sales]) [sales prior week] = calculate([sales], dateadd(sales[date], -7, day)) [sales wow] = ([sales] / [sales prior week])-1 

you should using separate, linked, date table calendar stuff!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -