Forum Discussion
Single Date Slicer to Apply Different Date Ranges to Different Plots
- 5 years ago
Hi amhiggins
Not clear how your data model and table structure look like, so I create a sample:
You may take steps for reference:
Create the measure:
secondmeasure = VAR _max = SELECTEDVALUE ( 'Table'[orderdate] ) RETURN CALCULATE ( SUM ( 'Table'[salestotal] ), FILTER ( ALL ( 'Table' ), 'Table'[orderdate].[Year] = YEAR ( _max ) && 'Table'[orderdate] >= 1 && 'Table'[orderdate] <= _max ) )Result:
When you select 2020.2, secondmeasure counts total during 2020.1-2020.2
When you select 2021.05, secondmeasure counts total during 2021.1-2021.5
Hope it helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi amhiggins
Not clear how your data model and table structure look like, so I create a sample:
You may take steps for reference:
Create the measure:
secondmeasure =
VAR _max =
SELECTEDVALUE ( 'Table'[orderdate] )
RETURN
CALCULATE (
SUM ( 'Table'[salestotal] ),
FILTER (
ALL ( 'Table' ),
'Table'[orderdate].[Year] = YEAR ( _max )
&& 'Table'[orderdate] >= 1
&& 'Table'[orderdate] <= _max
)
)Result:
When you select 2020.2, secondmeasure counts total during 2020.1-2020.2
When you select 2021.05, secondmeasure counts total during 2021.1-2021.5
Hope it helps.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.