Filter Calendar dimension table based on fact table value

NegaStar

New Member
Joined
Nov 3, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I would like to ask your help to find a solution of the following case.

I would like to get the minimum Calandar[Date] value which is equal or greater than TransctionPast[FirstValid] date.

Here are the relationships:

EnderWiggin_1-1635936691913.png


I created the following measure but it just uses a lot of RAM without any result, when I tried to put it in it in a power pivot's value section

EnderWiggin_2-1635936929233.png


I think it is caused by the relationship and the filter direction but I can not figure out how to get the required date value.

I would use it for further calcualtion which will be in the value section of a power pivot.

Could you help me to define the required measure? Please see the sample file on the following link. Thank you very much in advance!
Power Pivot Sample
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I'm not clear what you are trying to do. The calendar[date] column is joined to 2 columns
TransactionPast[YearMonth_FirstDate]
TransactionFuture[YearMonth_FirstDate]

I assume therefore that you are wanting to know the minimum of these 2 tables.
maybe like this
=min(min(TransactionPast[YearMonth_FirstDate]),min(TransactionFuture[YearMonth_FirstDate]))

but I think your model is more complex than it needs to be. Consider appending the 2 transaction tables together and add a new "Type" column for Past and Future
 
Upvote 0
Solution
I'm not clear what you are trying to do. The calendar[date] column is joined to 2 columns
TransactionPast[YearMonth_FirstDate]
TransactionFuture[YearMonth_FirstDate]

I assume therefore that you are wanting to know the minimum of these 2 tables.
maybe like this
=min(min(TransactionPast[YearMonth_FirstDate]),min(TransactionFuture[YearMonth_FirstDate]))

but I think your model is more complex than it needs to be. Consider appending the 2 transaction tables together and add a new "Type" column for Past and Future
Yes, you are right, meanwhile I did it on the same way and appended the future and past transaction tables. I found the problem of the high memory usage too, it was caused by the missing FirstValid date in the related filter context of power pivot table. Thank you very much for your quick response!
 
Upvote 0

Forum statistics

Threads
1,223,693
Messages
6,173,874
Members
452,536
Latest member
Chiz511

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top