Forum Discussion
item no wise Last 3 Transaction filter with posting date
- 6 years ago
Hi Anonymous ,
First you need to create a date table that is not associated as a slicer.
Then you need to enter "edit queries" to create an index column as the sorting condition, and you need to sort the date before creating the index column.
Then create the measure and apply the filterMeasure =
IF (
MAX ( test[Posting date] ) <= SELECTEDVALUE ( 'Table'[Posting date] ),
RANKX (
FILTER (
ALLEXCEPT ( test, test[Item No] ),
test[Posting date] <= SELECTEDVALUE ( 'Table'[Posting date] )
),
[measure2],
,
DESC
)
)You can also refer to the pbix
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your reply
if i Select posting date filter from posting date it is should show last 3 posting date Transaction details and remove duplicate entry also Below mention actual data and expected data
Actual data
Item No Posting Date
A 01-01-19
A 01-01-19
A 03-01-19
A 04-01-19
A 05-01-19
A 06-01-19
A 07-01-19
A 08-01-19
A 09-01-19
A 10-01-19
B 01-01-19
B 02-01-19
B 02-01-19
B 04-01-19
B 05-01-19
B 06-01-19
B 07-01-19
Expected Answer
If select Posting date 05-01-2019
Item No Posting date
A 03-01-19
A 04-01-19
A 05-01-19
B 02-01-19
B 04-01-19
B 05-01-19