Forum Discussion
tomkummerow91
6 years agoRegular Visitor
Dynamic What-if modelling
Hi! I'm trying to recreate a model which I've built in excel in Power BI. Basically it takes inputs from a series of drop down lists (will need to be slicers in PBI) and creates a variable based on ...
- 6 years ago
Hi tomkummerow91 ,
You can use one measure instead of multiple measures to realize what you need:
AxisControl Measure = IF(ISFILTERED('Tier Slicer'[Normal Tier]), IF ( SELECTEDVALUE ( 'Axis Table'[Concat] ) IN DISTINCT ( 'Data Slicer Table'[Concat] ) && SELECTEDVALUE ( 'Axis Table'[Normal Tier] ) IN FILTERS ( 'Tier Slicer'[Normal Tier] ), 1, IF ( SELECTEDVALUE ( 'Axis Table'[Concat] ) IN DISTINCT ( 'Data Slicer Table'[Concat] ) && NOT SELECTEDVALUE ( 'Axis Table'[Normal Tier] ) IN FILTERS ( 'Tier Slicer'[Normal Tier] ), -1, IF ( CALCULATE ( COUNTROWS ( 'Data' ), FILTER ( 'Data', 'Data'[Concat] IN FILTERS ( 'Axis Table'[Concat] ) && 'Data'[Normal Tier] IN FILTERS ( 'Axis Table'[Normal Tier] ) ) ) > 0, 1, -1 ) ) ),IF ( CALCULATE ( COUNTROWS ( 'Data' ), FILTER ( 'Data', 'Data'[Concat] IN FILTERS ( 'Axis Table'[Concat] ) && 'Data'[Normal Tier] IN FILTERS ( 'Axis Table'[Normal Tier] ) ) ) > 0, 1, -1 ))For the related .pbix file,pls click here.
Best Regards,
Kelly
v-kelly-msft
6 years agoCommunity Support
Hi tomkummerow91 ,
You need first create a relationship between the 2 tables, then put the columns of table data which you want to be filtered into a table visual, finally put the column of table modelling you wanna filter by into slicer, which are shown as below:
Best Regards,
Kelly