Forum Discussion
Really need some help... Date Table School Terms
- 5 years ago
BLAWHEEM1 , Make sure you do it in the Separate term table.
Create a Rank on start Date
New column
Term Rank = RANKX(all('Date'),'Date'[Start Date],,ASC,Dense)
measure example
This Term = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Term Rank]=max('Date'[Term Rank])))
Last Term = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Term Rank]=max('Date'[Term Rank])-1))
Hi BLAWHEEM1 ,
Sorry for that we are not clear about your issue.
Do you want to expand the date between start date and end date?
If yes, please refer the following steps.
1. Create a date table.
Date table = CALENDAR(MIN('Table'[Start date]),MAX('Table'[End date]))
2. Then create a result table.
Result Table =
SUMMARIZE(
FILTER(
CROSSJOIN('Date table','Table'),
'Table'[Start date]<='Date table'[Date]
&& 'Table'[End date]>='Date table'[Date]
),
'Table'[Term],
'Table'[Order],
'Date table'[Date])
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
- BLAWHEEM15 years ago
Helper I
Thanks v-zhenbw-msft
Probably not been very clear! I have moved on slightly and managed to create my date table with custom hierarchy, but have slightly different issue with measures.
Please see later post below - would be grateful for any insight as I will have to repeat this example with a variety of data showing currently selected and previous term side by side.
Thanks again!