Forum Discussion
Group by Data Ranges
- 10 years ago
Elliott First you need a table with the text that you need on the slicer with also a column for sorting and getting the value.
Use "Enter Data" to create a table
Period Sort Today's Data 1 Last 7 Days 2 Last 30 Days 3
The table won't have any relantionship with others ( let's call it "Periods")
Create a new measure that will change based on the slicer selection
VariablePeriod = SWITCH ( MIN ( Periods[Sort] ); 1; CALCULATE ( [yourmeasure]; FILTER ( Table; Table[Days Aging] = 1 ) ); 2; CALCULATE ( [yourmeasure]; FILTER ( Table; Table[Days Aging] > 1 && Table[Days Aging] <= 7 ) ); 3; CALCULATE ( [yourmeasure]; FILTER ( Table; Table[Days Aging] > 30 ) ) )Now add as slicer the Periods field from "Periods Table" and use the [VariablePeriods] for your graphs.
Notice that if there is no selection on the slicer it will calculate the MIN( Periods[Sort]) which is Today's. You can use MAX if you want to show all data.
*I am writing without pbix open, so maybe some mispelling on formula.
* If you go to powerpivotpro.com and search " disconnected slicer" there are many and great posts on the subject
Current workaround is to create 3 separate columns for instance...
Last 7 days writes in every relevant row, leaves all others blank
Last 30 day writes in every relevant row, leaves all others blank
Then create seperate slicers for each column / hide titles etc..etc.. don't show blanks.. then allign next to each other..
Would be better in a single slicer but don't think the functionality is there.. please correct me if I'm wrong!