Forum Discussion
How to get a filter to work for another table?
- 5 years ago
If you create a calculated column using the code I posted:
However, calculated columns are static and are set when the model is loaded. In other words, they are unaffected by filters and slicers.
You need to go about this by creating a visual with a measure. First the model in this example:
Then create a measure using:
# of events = DISTINCTCOUNT(Event[Event])Now create a visual including the contact field from the contact table and add the above measure:
Add the slicers and you get this:
However, you can´t use measures to filter pages or reports, only visuals.
I've attached the sample PBIX file
Thanks for replying, Paul! Unfortunately, the Date filter still doesn't work. Would you have a different solution? Big thanks!
If you create a calculated column using the code I posted:
However, calculated columns are static and are set when the model is loaded. In other words, they are unaffected by filters and slicers.
You need to go about this by creating a visual with a measure. First the model in this example:
Then create a measure using:
# of events = DISTINCTCOUNT(Event[Event])
Now create a visual including the contact field from the contact table and add the above measure:
Add the slicers and you get this:
However, you can´t use measures to filter pages or reports, only visuals.
I've attached the sample PBIX file
- AliceW5 years ago
Power Participant
Thank you so much, Paul. What a detailed answer! It seems I will need to add the year in the column if I want some filters...
Big thanks!!