Forum Discussion
MTD measure
- 9 years ago
Anonymous Many thanks mate.
Still for some reason, what you have suggested did give me blank figures when I filter "current month" however you gave me the idea of doing the following:
I created a duplicate column for (meAccountTransaction[TransactionDate]) changed the format to date only and then created a direct relationship between (meAccountTransaction[TransactionDate]) and (meCalendar[DateValue])
Appreciate your help, it was a spot on. am getting the figures up to the minute!
- Anonymous9 years ago
The columns in the relationship must be the same. If one is datetime and the other is date only, there will be zero matches between the two columns.
majdkaid22 I cannot replicate that. It works fine in my test. Are you sure there's not another visual level filter on that blank card?
Silly question, you do have a table relationship between meAccountTransaction[TransactionDate] and meCalendar[DateValue] right?
Anonymous Yes between ValueDate in Calander and TransactionDate in meAccountTransaction
- Anonymous9 years agoNot applicable
majdkaid22 almost. When you create a second relationship between the same two tables the new relationship is inactive. This means that you have to explicitly tell formulas to use it. By default all formulas will use that first relationship. So your MTD formula should now be:
MTD Deposits = CALCULATE( SUM(meAccountTransaction[Deposits]), DATESMTD(meCalendar[DateValue]), USERELATIONSHIP( meAccountTransaction[TransactionDate], meCalendar[DateValue] ) )
- majdkaid229 years ago
Helper V
Anonymous apologies, the relationship is between CalendarDateID and PostingDateID
I think my DateValue and TransactionDate need to have the same format before they can be linked together no?
If the relationship then between those 2, it should be all solved?
- majdkaid229 years ago
Helper V
Anonymous Many thanks mate.
Still for some reason, what you have suggested did give me blank figures when I filter "current month" however you gave me the idea of doing the following:
I created a duplicate column for (meAccountTransaction[TransactionDate]) changed the format to date only and then created a direct relationship between (meAccountTransaction[TransactionDate]) and (meCalendar[DateValue])
Appreciate your help, it was a spot on. am getting the figures up to the minute!
- Anonymous9 years agoNot applicable
The columns in the relationship must be the same. If one is datetime and the other is date only, there will be zero matches between the two columns.