I need a slicer for ticking only those Products and Regions which have budgeted Targets.
My data model is a bit complicated than I show here. In my real scenario table Budget does not exist and Target values have to be calculated from other tables of varying granularity. Lets assume we cannot use calculated column on Budget table.
Here green tables are one-column-all-values-dimension bridges. The red table is a Cartesian product of Products and Brands with calculated Target.
Here is a DAX code for the red table I cooked to solve the problem.
#Brand x Region =
ADDCOLUMNS (
CROSSJOIN ( '#product', '#region' ),
"Target", CALCULATE ( SUM ( Budget[target] ) ),
"IsTarget", IF ( CALCULATE ( SUM ( Budget[target] ) ) > 0, "Yes", "No" )
)
But such cunningly obtained column IsTarget does not affect my visuals through the slicer. How to fix it.
File PBIX here.
Edit after comments.
Alexis, is that what you mean? I added column P@R which is concatenation of Product and Region. It seems to work:-)
Budget
. – Alexis Olson