Forum Discussion
Visualization for contract start/end dates and cost
- 9 years ago
Hi kiranbrao,
You can create a calendar table:
Calendar = CALENDAR(MIN('Table1'[Contract start date]),MAX('Table1'[Contract end date]))
Then create a measure in fact table:
Amount = CALCULATE(SUM('Table1'[Contract amount]),FILTER('Table1','Table1'[Contract start date]<=MAX('Calendar'[Date]) && 'Table1'[Contract end date]>=MAX('Calendar'[Date])))
Please check attached .pbix file.
Best Regards,
Qiuyun Yu
Hi kiranbrao,
You can create a calendar table:
Calendar = CALENDAR(MIN('Table1'[Contract start date]),MAX('Table1'[Contract end date]))
Then create a measure in fact table:
Amount = CALCULATE(SUM('Table1'[Contract amount]),FILTER('Table1','Table1'[Contract start date]<=MAX('Calendar'[Date]) && 'Table1'[Contract end date]>=MAX('Calendar'[Date])))
Please check attached .pbix file.
Best Regards,
Qiuyun Yu
- bmrph9 years agoNew Member
Is there anyway to group these by month?
- thugthug8 years agoFrequent Visitor
i tried to make it a cumulative line, but unfortunately i messed it up.
Running Actuals = CALCULATE(SUM(Table1[Contract amount],FILTER(ALL(Table1[Contract start date],'Calendar'[Date].[Date]<=MAX('Calendar'[Date].[Date])))))
Is there any measure for this, but cumulative?
- Shelley6 years agoPost Prodigy
v-qiuyu-msft This is really helpful. Thank you! I plotted my contract values over time, but now is there a way to plot actual transactions as the run up to the total contract value, and then start over at the new contract? My formulas are giving me the blue and red line, but I want the blue and orange line.
BLUE Line:
Entitlement Amount =CALCULATE(SUM('Entitlements'[Entitlement Cap]),FILTER('QBContract','QBContract'[SAP Contract Start] <= MAX('RA_Daily_Calendar'[Date]) &&'QBContract'[SAP Contract End] >= MAX('RA_Daily_Calendar'[Date])))RED Line:List Price Amount =
CALCULATE(SUM('Transaction'[List_Price]),FILTER(ALLSELECTED('RA_Daily_Calendar'[CalendarYear-Mo]),ISONORAFTER('RA_Daily_Calendar'[CalendarYear-Mo], MAX('RA_Daily_Calendar'[CalendarYear-Mo]), DESC)))I also tried this, but this really didn't work:
Amount List Price =CALCULATE(SUM('Transaction'[List_Price]),FILTER('QBContract','QBContract'[SAP Contract Start] <= MAX('RA_Daily_Calendar'[Date]) &&'QBContract'[SAP Contract End] >= MAX('RA_Daily_Calendar'[Date])))Thanks for your help!- Ashish_Mathur6 years agoSuper User
Hi,
Share some data and show the expected result in a simple table format.