Forum Discussion
Measure Column in Table Visual Causes Filters to be Ignored
- 4 years ago
Ceeeg I can try to explain but I know why it is not working. This is why star schema is the recommended/best practice. To visualize the issue, in a table visual where you have store and sales with zero measure, add store type from the store type table, now filter on Fashion and you expect to see two stores (A and B) but you will see other stores as well showing for the selected type even though those stores are not associated with type fashion and the reason for that is we are forcing to add zero to the measure. So this is the main explanation why you see all the stores.
To overcome the best practice is to use star schema and/or update your measure something like this:
Sales Plus Zero = VAR __ForceZero = IF ( NOT ISBLANK ( SELECTEDVALUE ( Stores[Store Name] ) ), 0 ) RETURN Sum('Sales'[Value]) + __ForceZeroI hope it makes sense. Great question though.
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort 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.
Ceeeg I can try to explain but I know why it is not working. This is why star schema is the recommended/best practice. To visualize the issue, in a table visual where you have store and sales with zero measure, add store type from the store type table, now filter on Fashion and you expect to see two stores (A and B) but you will see other stores as well showing for the selected type even though those stores are not associated with type fashion and the reason for that is we are forcing to add zero to the measure. So this is the main explanation why you see all the stores.
To overcome the best practice is to use star schema and/or update your measure something like this:
Sales Plus Zero =
VAR __ForceZero = IF ( NOT ISBLANK ( SELECTEDVALUE ( Stores[Store Name] ) ), 0 )
RETURN
Sum('Sales'[Value]) + __ForceZero
I hope it makes sense. Great question though.
✨ Follow us on LinkedIn and to our YouTube channel
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort 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.