Forum Discussion
How to filter a measure by multiple values
- 8 years ago
Hi ohojames,
To what I can see from your measure all the filters are made based on the same table so the filter option is not needed to have it based on your filter. When you have a slicer based on a table all the information is filter from your measures and visuals accordingly so by default you are already making selected values.
Based on your measure and if you have a slicer from table 1 for datatype & datekey your measure should look something like this:
attractionSummary = VAR datekey = MAX ( ALL ( 'A'[datekey] ) ) RETURN CALCULATE ( SUM ( 'A'[date_publish_all] ), 'A'[datekey] = datekey && 'A'[actor_id] = 1 )No need to place the data_type in your filter since you are getting the only selected values from your filter to make the calculations
Can you share some data, model setup and expected result.
Regards,
MFelix
Hi ohojames,
To what I can see from your measure all the filters are made based on the same table so the filter option is not needed to have it based on your filter. When you have a slicer based on a table all the information is filter from your measures and visuals accordingly so by default you are already making selected values.
Based on your measure and if you have a slicer from table 1 for datatype & datekey your measure should look something like this:
attractionSummary =
VAR datekey =
MAX ( ALL ( 'A'[datekey] ) )
RETURN
CALCULATE (
SUM ( 'A'[date_publish_all] ),
'A'[datekey] = datekey
&& 'A'[actor_id] = 1
)No need to place the data_type in your filter since you are getting the only selected values from your filter to make the calculations
Can you share some data, model setup and expected result.
Regards,
MFelix