Forum Discussion
harshagraj
Post Partisan
6 years agoTo get last 6 weeks from Fiscal week
Hi all I need to get a KPI visual it should display last 6 weeks for the amount and filter to be applied is Actuals. And also target is the Previous week. Please help me to achieve this. FW ...
- 6 years ago
I think,
Target Measure = VAR __FW = MAX([FW]) VAR __Table = FILTER('Table',[Filter] = "Actuals" && [FW] = __FW - 1) RETURN SUMX(__Table,[Amount])
Greg_Deckler
Community Champion
6 years agoOK, you should just be able to filter your visual. If you want to get fancy about it, create a column like:
Column =
VAR __FW = MAXX('Table',[FW])
VAR __MinFW = __FW - 6 + 1
RETURN
IF([FW] > __MinFW,"Include","Exclude")
Then just filter your axis on that column. This way it stays up-to-date as data gets refreshed.
harshagraj
Post Partisan
6 years agoWow Greg_Deckler perfect!! thanks a lot for this. It is working just the way i wanted. One last question I have to use last week' Amount in target goal. In this case Week 29 will be current week and in the Target i want the amount of week 28.
- Greg_Deckler6 years ago
Community Champion
I think,
Target Measure = VAR __FW = MAX([FW]) VAR __Table = FILTER('Table',[Filter] = "Actuals" && [FW] = __FW - 1) RETURN SUMX(__Table,[Amount])- harshagraj6 years ago
Post Partisan
Greg_Deckler I dont know how to thank you but thanks a lot. It worked perfectly.
- Greg_Deckler6 years ago
Community Champion
Happy to help! Glad it got you going!