Forum Discussion
Jorritster
4 years agoFrequent Visitor
Context issue when adding measure to a table
Hi all, I am creating a model in which I check whether our customers have reached a particular Threshold in a particular country. If this happens we have to report for them more extensively. Ther...
- 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
Jorritster
4 years agoFrequent Visitor
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?
Anonymous
4 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"
)
)
RETURN
Result
|
Best Regards