Forum Discussion
Need Help with time intelligence
Hi all,
in a project cost analysis data model I'm calculating the money spent in the measure [CashOUT] which sums up 3 measures which calculate the CashOUT from 3 different tables. All 3 tables have a relationship with the Date table through the CashOUT Date columns.
Each Project has a Start Date represented by the measure [SelectedNTP]. For several projects, money has been spent already prior to their start date (NTP). Please see below a chart showing the [CashOUT] measure and running total of the CashOUT for a specific project.
Now i would like to move any CashOUT occured prior to the NTP date, to the NTP date while not affecting any CashOUT occured after the NTP date. I could solve the matter with 3x calculated columns in each CashOUT table which moves any CashOUT date which is prior to NTP, to the NTP and then using those columns for the relationships with the Date table, but I would like to solve the matter withthout the addition of columns and relationsships.
Any help for this?
Best regards
- Anonymous4 years ago
Hi ITManuel ,
Could you please mark your post as Answered since your problem has been resolved? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
Best Regards
5 Replies
- ITManuelResponsive Resident
This would be the desired result.
- ITManuelResponsive Resident
I'm trying the follwing code which, according to my understanding should reflect the concept of DATEADD , but its not working at all.
InvCashOUTEUR = VAR _NTP = [SelectedNTP] -- Start date project VAR _CashOUT = [PurmICashOUTEUR] + [Mod770ValueEUR] + [PInvCashOUTEUR] VAR _T1 = TREATAS ( SELECTCOLUMNS ( CALCULATETABLE( DISTINCT ( 'Date'[Date] ) ), "Date", IF ( 'Date'[Date] < _NTP, _NTP, 'Date'[Date] ) ), 'Date'[Date] ) VAR _Result = CALCULATE ( _CashOUT, _T1 ) RETURN _Result- AnonymousNot applicable
Hi ITManuel ,
It's a little difficult to find the cause of problem base on current information. Could you please provide some sample data involved in your visual (exclude sensitive data) with Text format and your expected result with backend logic and special examples? By the way, Is there any relationship created between the Date table and your actual table? It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards