Forum Discussion
someone
8 years agoFrequent Visitor
Using a Slicer to Always Display Previous 4 Rows without
I have gotten a request to make the report I'm working on always display the previous four quarters (without using multi-select) depending on which selection is made. The data is organized as follows...
- 8 years ago
Hi someone
1. In query editor, create an index column from 1.
Then create a blank query, and write code in Advanced editor.
let Source = Table.SelectColumns(Sheet1,{"Quarter","Index"}) in Source2. In Relationship View, create the relationship between two tables.
3. In Report view, create measures, then add [Measure 3] to the Visual Filter and show 1
Measure = SELECTEDVALUE(Query1[Index]) Measure 2 = [Measure]-4 Measure 3 = IF(MAX(Sheet1[Index])>=[Measure 2]&&MAX(Sheet1[Index])<[Measure],1,0)
Best Regards
Maggie
parry2k
8 years agoSuper User
Does your dataset have a date? If not then you can add a index column and then can be worked thru that. It will be good to know what your dataset looks like before giving the solution.
someone
8 years agoFrequent Visitor
My dataset does not have a date. The quarter format is a column with shorthand for fiscal year (the year) and quarter (quarter number). You can see it in this picture: