Forum Discussion
Using a Static Value in a Measure Breaks Visual Filters
I have a table visual filtered by slicers and report filters. I've created a series of measures that evaluate each row within that data table by referencing a value within that table. When I try to apply a static value to a new measure the table filters are ignored and all values appear.
As an example, I have a data table with accounts filtered by a slicer indicating a sales territory. An example of a measure would be a count of orders for those customers from a related table. When I try to apply any static value or logic the filters on the table break. As an example if I create a measure that says IF([OrderCount]>1,"Active,"Inactive") then all values from the customer table now appear in the visual.
What am I doing wrong here?
Thanks parry2k that worked. Although I'm not sure I understand why. I have the same issue when applying even simple calculations i.e. if I wanted to just subtract a value from [OrderCount] the same thing occurs. So would I have to add an IF statement like that to evaluate if it is not blank? I think that's where I get tripped up.
3 Replies
- parry2kSuper User
WiggityZwiggity because you are now returning the value in this new measure, try it like this
IF([OrderCount]>1,"Active,IF (NOT (ISBLANK([OrderCount]),"Inactive"))- WiggityZwiggityNew Member
Thanks parry2k that worked. Although I'm not sure I understand why. I have the same issue when applying even simple calculations i.e. if I wanted to just subtract a value from [OrderCount] the same thing occurs. So would I have to add an IF statement like that to evaluate if it is not blank? I think that's where I get tripped up.
- parry2kSuper User
WiggityZwiggity Glad, it worked. Although it doesn't matter I think by mistake your accepted your reply as a solution.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡