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.
Create a new column in table
Rank = RANKX(all(Table[Item No]),Table[Posting date],,DESC,Dense)
and then filter for rank <=3
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin