'DAX hasonevalue but also total

I have at table where I show a calcutated measure, but in the visulization I only want to show the measures if a specific dimension is in the filter.

This works great with HASONEVALUE:

Dividedmeasure:= IF(HASONEVALUE('Employment'[EmploymentGroup]), DIVIDE([measure1)], [Measure2],(BLANK() )))

The problem is HASONEVALUE also blanks the total which Is not what I want. I want to blank everything where EmploymentGroup is not in the filters since the report doens't make sense without Employmentgroup. Any suggestions?

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source