Forum Discussion
Calculate data at max startdate based on slicers
Hi XuanHau ,
How do you create the relationship? Could you please show more details about your question?
I recommend you try to add all in your current measure.
CALCULATE(SUM(A[Quantity]), FILTER(ALL(Datetable), Datetable[Date] = MAX(A[Start Date])))
If above method doesn’t work, here is another workaround for your reference.
Measure = IF( MAX('A'[Start Date]) = MAXX( FILTER(ALL('A' ) , YEAR( 'A'[Start Date] ) = YEAR(MAX('Datetable'[Date]) ) && MONTH( 'A'[Start Date] ) = MONTH( MAX('Datetable'[Date]) ) ) , [Start Date]) ,1,0)
Then set the measure in Filter as bellow.
Here is result of my test.
My table A.
When I select August 2024, the table just shows one record with max StartDate.
Best regards,
Mengmeng Li
- XuanHau2 years ago
Helper I
Hi Anonymous
The workaround measure works for me, but I have a question: can we include it in a measure instead of using a filter? I also use quantity at the max date in another measure.
I have attached the link to my report in the original post for my example data (this file does not use the workaround you mentioned).
- Anonymous2 years agoNot applicable
Hi XuanHau ,
I'm afraid can't. The measure just returns a number, it can't be used as Filter in column field. In general, we recommend that user put the measure in Filter and complete the row filter based on the value returned by the measure.😀
Best regards,
Mengmeng Li