Forum Discussion
CarlBlunck
Resolver I
2 years agoCalculate with not equal to filter issue
Hi team,
I have this measure:
PerformanceReview_Total = CALCULATE(
DISTINCTCOUNT(fact_PerformanceReview[Person Person No.]),
fact_PlacementData[PersonStatus] = "Existing",
fact_PlacementData[BaseClass] <> "UNPAID"
)
Which is working as expecting. However, when I use a filter on this page that lets me select a value from the fact_PlacementData[BaseClass] column, the value of the measure is not changing.
When I update the measure to be:
PerformanceReview_Total = CALCULATE(
DISTINCTCOUNT(fact_PerformanceReview[Person Person No.]),
fact_PlacementData[PersonStatus] = "Existing"
)
The value of the measure does change when select a value from the fact_PlacementData[BaseClass] column when using a filter on this page.
Here is the issue - I swear, last week, the value was updating when I had the fact_PlacementData[BaseClass] <> "UNPAID" filter in the measure. But now it's not and I can't understand why.
Any thoughts or ideas?
Thanks
Carl
CarlBlunck I just answered the similar question, update your measure to this:
PerformanceReview_Total = CALCULATE( DISTINCTCOUNT(fact_PerformanceReview[Person Person No.]), KEEPFILTERS ( fact_PlacementData[PersonStatus] = "Existing" ), KEEPFILTERS ( fact_PlacementData[BaseClass] <> "UNPAID" ) )To learn more about keepfilters, check this video on my YT channel:
4 Replies
- parry2k
Super User
CarlBlunck I just answered the similar question, update your measure to this:
PerformanceReview_Total = CALCULATE( DISTINCTCOUNT(fact_PerformanceReview[Person Person No.]), KEEPFILTERS ( fact_PlacementData[PersonStatus] = "Existing" ), KEEPFILTERS ( fact_PlacementData[BaseClass] <> "UNPAID" ) )To learn more about keepfilters, check this video on my YT channel:
- CarlBlunck
Resolver I
Thanks parry2k ! Did something change lately to require the keepfilters() function to be included?
- parry2k
Super User
CarlBlunck Not at all, this is how DAX works.
- CarlBlunck
Resolver I
Interesting parry2k - last week I swear it was behaving differently. But could also be dreaming... Thanks for helping me with this.