azbasketcat
New Member
- Joined
- Feb 20, 2010
- Messages
- 30
I'm trying to create a pivot table that displays the most recently used bank for each store. I have a scenario where stores have been changing banks over the last several months and I want to quickly find out what bank a store is currently using.
I am using a single PowerPivot table that contains bank transactions from all stores and all banks with the following columns:
1) Transaction ID (Primary key - unique and sequential)
2) Store ID
3) Date (a store may have 0, 1 or more transactions per day)
4) Amount
5) Bank name
The pivot table will be pretty simple with the Store ID in the rows and the Bank Name in the values.
I created a measure to get the Max Transaction ID = max(Bank[Transaction ID]). This measure works.
However, I can not get my calculate function to filter to one row for each store.
Here is my measure for Most Recent Bank = CALCULATE(Values(Bank[Bank Name]),FILTER(Bank,Bank[Transaction ID]=[Max Transaction ID]))
Any help on why this does not filter to the row equal to the Max Transaction ID for each store is appreciated.
Thanks - Randy
I am using a single PowerPivot table that contains bank transactions from all stores and all banks with the following columns:
1) Transaction ID (Primary key - unique and sequential)
2) Store ID
3) Date (a store may have 0, 1 or more transactions per day)
4) Amount
5) Bank name
The pivot table will be pretty simple with the Store ID in the rows and the Bank Name in the values.
I created a measure to get the Max Transaction ID = max(Bank[Transaction ID]). This measure works.
However, I can not get my calculate function to filter to one row for each store.
Here is my measure for Most Recent Bank = CALCULATE(Values(Bank[Bank Name]),FILTER(Bank,Bank[Transaction ID]=[Max Transaction ID]))
Any help on why this does not filter to the row equal to the Max Transaction ID for each store is appreciated.
Thanks - Randy