Forum Discussion
creating measure using dax
- 3 years ago
Since you already have a date table then no need for a Years table. Sorry for that but I did not have all the information about your data model.
Two relationshops have to be created. One "Active" between DateTable[Date] and Query[Basic fin.] and other "Inactive" between DateTable[Date] and Query[Out of Warranty]
The measure would be
Remaining Quanitiies of Product Still in Warrenty = CALCULATE ( SUM ( 'Query'[Del. qty] ), 'DateTable'[Year] >= MAX ( 'DateTable'[Year] ), USERELATIONSHIP ( 'Query'[Out of Warranty], 'DateTable'[Date] ) )
It should be <= not >=
that was a mistake from my side.
I reversed the sign but now It corrected the firs part but the second part (the curve should be go down with every unit outing from warrenty )
Regards
- tamerj12 years agoCommunity Champion
It cannot as this is a running total. Unless you remove completely the filter argument but only keeps the USERELATIONSHIP then you would obtain the trend that you've described. But that won't be a running total.