countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 765
Hello friends, hope all is well! please help.
The following DAX formulas works fine, and displays the average, max and min of values of all branches.
= CALCULATE(average(DB[LTM]), FILTER( DB, DB[Year]=earlier(DB[Year])&&DB[Month]=earlier(DB[Month])&&DB[Item]=earlier(DB[Item])) )
= CALCULATE(MAX(DB[LTM]), FILTER( DB, DB[Year]=earlier(DB[Year])&&DB[Month]=earlier(DB[Month])&&DB[Item]=earlier(DB[Item])) )
= CALCULATE(MIN(DB[LTM]), FILTER( DB, DB[Year]=earlier(DB[Year])&&DB[Month]=earlier(DB[Month])&&DB[Item]=earlier(DB[Item])) )
problem is I don't get the correct average, min, or max if I choose less branches through the slicers. (i.e. all branches have to be selected).
I wish for the formula to adjust based on the slicer selections. can that be done?
thank you so much in advance!
The following DAX formulas works fine, and displays the average, max and min of values of all branches.
= CALCULATE(average(DB[LTM]), FILTER( DB, DB[Year]=earlier(DB[Year])&&DB[Month]=earlier(DB[Month])&&DB[Item]=earlier(DB[Item])) )
= CALCULATE(MAX(DB[LTM]), FILTER( DB, DB[Year]=earlier(DB[Year])&&DB[Month]=earlier(DB[Month])&&DB[Item]=earlier(DB[Item])) )
= CALCULATE(MIN(DB[LTM]), FILTER( DB, DB[Year]=earlier(DB[Year])&&DB[Month]=earlier(DB[Month])&&DB[Item]=earlier(DB[Item])) )
problem is I don't get the correct average, min, or max if I choose less branches through the slicers. (i.e. all branches have to be selected).
I wish for the formula to adjust based on the slicer selections. can that be done?
thank you so much in advance!