Forum Discussion
Diferent values with the same filter
HI guys
i need help with a table that have 2 different dates is look like this
and the sell amount is with the filter form the column redem date, and beside of that i need calculate the seel from past (sells with a date from column (buy date) that made before the dates in the filter (redem date) in this case row 2 and 3, and the future sale but in this case with sell made in the same period but filtering the sell column and looking redem date in this case row 6. i duplicated the table and use a calender between both so i can filter with both columns at the same time but i cant create a measure to calculate this 2 amounts
4 Replies
- SteveHailey
Solution Specialist
Give these two measures a try:
less sell =VAR FromDate = MIN( 'Calendar'[Date] )VAR ToDate = MAX( 'Calendar'[Date] )VAR Result =CALCULATE(SUM( 'Table'[sell] ),FILTER('Table','Table'[buy date] < FromDate&& 'Table'[redem date] >= FromDate&& 'Table'[redem date] <= ToDate))RETURNResultand:future sell =VAR FromDate = MIN( 'Calendar'[Date] )VAR ToDate = MAX( 'Calendar'[Date] )VAR Result =CALCULATE(SUM( 'Table'[sell] ),FILTER('Table','Table'[buy date] >= FromDate && 'Table'[buy date] <= ToDate&& 'Table'[redem date] > ToDate))RETURNResult-Steve- munderFrequent Visitor
HI Steve SteveHailey thanks for the answer, i did both measure but the result is blank, i change some part off the measure but the same result...., you have any other idea, i will appreciate.
thanks and reagrds
- SteveHailey
Solution Specialist