Forum Discussion
Context issue when adding measure to a table
- Anonymous4 years ago
Hi Jorritster ,
I updated the sample pbix file provided by tamerj1 (see attachment), please check if that is what you want...
1. Change the cross filter direction as Both
2. Update the formula of measure [Threshold_Passed] as below
Threshold_Passed =VAR YTDTaxable =[YTD_TaxableBasis]VAR Threshold =CALCULATE (SUM ( 'Thresholds'[Threshold] ),FILTER('CDM','CDM'[Direction]=SELECTEDVALUE('Direction'[Direction])) // CROSSFILTER ( CDM[Direction], Direction[Direction], BOTH ))VAR Result =IF (YTDTaxable > Threshold,"TRUE",IF (NOT ISBLANK ( Threshold ),"FALSE"))RETURNResultBest Regards
It is working just fine in the sample file I've shared on my previous reply. Please make sure to adjust the relationships as advised.
tamerj1 Actually it does not:
As you can see it displays multiple countries, while in the contract table only the NL is in scope. So ideally I would love to see just NL in this country slicer in this scenario. Is this possible?
- Anonymous4 years agoNot applicable
Hi Jorritster ,
I updated the sample pbix file provided by tamerj1 (see attachment), please check if that is what you want...
1. Change the cross filter direction as Both
2. Update the formula of measure [Threshold_Passed] as below
Threshold_Passed =VAR YTDTaxable =[YTD_TaxableBasis]VAR Threshold =CALCULATE (SUM ( 'Thresholds'[Threshold] ),FILTER('CDM','CDM'[Direction]=SELECTEDVALUE('Direction'[Direction])) // CROSSFILTER ( CDM[Direction], Direction[Direction], BOTH ))VAR Result =IF (YTDTaxable > Threshold,"TRUE",IF (NOT ISBLANK ( Threshold ),"FALSE"))RETURNResultBest Regards