Forum Discussion
visual KPI week previous week
Hello, I need your help.
I need have a visual KPI with sales ( "ventas" in my file) of the last week and the gol is sales of previus week. I can't do this.
I try to calculate "previous week= semana -1", but it isn't work.
My file is the following..
Thanks!
hi, lbama7k
You may refer to this post I have solved:
And for your case, add a rank column by YearWeek.
Rank = RANKX(Table1,Table1[YearWeek],,ASC)
Then use this measure for kpi visual
Measure = CALCULATE(SUM(Table1[Ventas]),FILTER(ALLSELECTED(Table1),Table1[Rank]=MAX(Table1[Rank])-1))
Result:
and here is pbix file, please try it.
Best Regards,
Lin
3 Replies
- lbama7kFrequent Visitor
Hello, I need your help.
I need have a visual KPI with sales ( "ventas" in my file) of the last week and the gol is sales of previus week. I can't do this.
I try to calculate "previous week= semana -1", but it isn't work.
My file is the following..
Thanks!
- v-lili6-msftCommunity Support
hi, lbama7k
You may refer to this post I have solved:
And for your case, add a rank column by YearWeek.
Rank = RANKX(Table1,Table1[YearWeek],,ASC)
Then use this measure for kpi visual
Measure = CALCULATE(SUM(Table1[Ventas]),FILTER(ALLSELECTED(Table1),Table1[Rank]=MAX(Table1[Rank])-1))
Result:
and here is pbix file, please try it.
Best Regards,
Lin
- lbama7kFrequent Visitor
Hello! It works. Thanks!!