Forum Discussion
Slicer for complex date range
- 2 years ago
I haven't inspected your Range measure, but if you have it working for the table, then you're on the right track.
It's annoying, but you'll have to add the measure to 'Filters on this visual' (you can add filters there even if they aren't used in the pie chart / visual itself). Set that to only show values greater than 0.
The issue you may run into is that your pie chart has a different evaluation context than your table. So if that's the case, you'll need to create another measure and use that to filter the pie chart instead:
NewFilterRangeMeasure =
COUNTROWS ( FILTER ( TableContextfromVisual , [Range] > 0 ) )
To get the TableContextfromVisual, either use VALUES function with the column that's unique in the visual you've used, or you may need to use summarize or another TABLE function:
- 2 years ago
AllisonKennedy Thank you for the reply. After reading through your suggestions I feel like I may have missed something crucial in my initial explanation. I'm using the DAX below to create a new table for my first pie chart. My approach was going to be the same for each additional pie chart since the data is based on the query from my master dataset my plan was for that to be my "source of truth."
Gender = SELECTCOLUMNS(NewClients,"Name", [Name], "Gender", [Gender], "Start Date", [Start], "End Date", [[End])Wih that said it occured to me that all I needed to do was to add an additional range measure using the same calendar fields but using the start and end date from my gender created table. This seems to be working exactly as I'd hoped for and am surprised I couldnt' see the solution sooner. Either way your suggestions indeed helped me arrive at this conclusion and for that I thank you very much.
I haven't inspected your Range measure, but if you have it working for the table, then you're on the right track.
It's annoying, but you'll have to add the measure to 'Filters on this visual' (you can add filters there even if they aren't used in the pie chart / visual itself). Set that to only show values greater than 0.
The issue you may run into is that your pie chart has a different evaluation context than your table. So if that's the case, you'll need to create another measure and use that to filter the pie chart instead:
NewFilterRangeMeasure =
COUNTROWS ( FILTER ( TableContextfromVisual , [Range] > 0 ) )
To get the TableContextfromVisual, either use VALUES function with the column that's unique in the visual you've used, or you may need to use summarize or another TABLE function:
AllisonKennedy Thank you for the reply. After reading through your suggestions I feel like I may have missed something crucial in my initial explanation. I'm using the DAX below to create a new table for my first pie chart. My approach was going to be the same for each additional pie chart since the data is based on the query from my master dataset my plan was for that to be my "source of truth."
Gender = SELECTCOLUMNS(NewClients,"Name", [Name], "Gender", [Gender], "Start Date", [Start], "End Date", [[End])
Wih that said it occured to me that all I needed to do was to add an additional range measure using the same calendar fields but using the start and end date from my gender created table. This seems to be working exactly as I'd hoped for and am surprised I couldnt' see the solution sooner. Either way your suggestions indeed helped me arrive at this conclusion and for that I thank you very much.