Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi, I have a Calculated Table that seems to be working almost fine :
EVALUATE
VAR Today = TODAY()
VAR MaxTerms = DATEDIFF(
MIN('DIM_SalesforceProject'[GoLiveDate]),
Today,
YEAR
)
RETURN
ADDCOLUMNS(
GENERATE(
GENERATESERIES(
1,
MaxTerms
),
SELECTCOLUMNS(
'DIM_SalesforceProject',
"Contract_StartDate",
'DIM_SalesforceProject'[GoLiveDate],
"ProjectCode",
'DIM_SalesforceProject'[ProjectCode]
)
),
"Term_StartDate", DATEADD(
'DIM_SalesforceProject'[GoLiveDate],
[Value] - 1,
YEAR
),
"Term_EndDate", DATEADD(
'DIM_SalesforceProject'[GoLiveDate],
[Value] ,
YEAR
) - 1
)
The result of this is the following :
For some reason, future dates are not showing.
Its like the "Value" Column is returning Blank, but I dont get why.
Any Help ?
Solved! Go to Solution.
Hi @RobbeVL90 ,
Please update the formula of calculated table as below and check if it can return the expected result... Please find the details in the attachment.
EVALUATE
VAR Today =
TODAY ()
VAR MaxTerms =
DATEDIFF ( MIN ( 'DIM_SalesforceProject'[GoLiveDate] ), Today, YEAR )
RETURN
ADDCOLUMNS (
GENERATE (
GENERATESERIES ( 1, MaxTerms ),
SELECTCOLUMNS (
'DIM_SalesforceProject',
"Contract_StartDate", 'DIM_SalesforceProject'[GoLiveDate],
"ProjectCode", 'DIM_SalesforceProject'[ProjectCode]
)
),
"Term_StartDate",
EDATE ( [Contract_StartDate], ( [Value] - 1 ) * 12 ),
"Term_EndDate",
EDATE ( [Contract_StartDate], [Value] * 12 ) - 1
)
Best Regards
Hi @RobbeVL90 ,
Please update the formula of calculated table as below and check if it can return the expected result... Please find the details in the attachment.
EVALUATE
VAR Today =
TODAY ()
VAR MaxTerms =
DATEDIFF ( MIN ( 'DIM_SalesforceProject'[GoLiveDate] ), Today, YEAR )
RETURN
ADDCOLUMNS (
GENERATE (
GENERATESERIES ( 1, MaxTerms ),
SELECTCOLUMNS (
'DIM_SalesforceProject',
"Contract_StartDate", 'DIM_SalesforceProject'[GoLiveDate],
"ProjectCode", 'DIM_SalesforceProject'[ProjectCode]
)
),
"Term_StartDate",
EDATE ( [Contract_StartDate], ( [Value] - 1 ) * 12 ),
"Term_EndDate",
EDATE ( [Contract_StartDate], [Value] * 12 ) - 1
)
Best Regards
try this :
EVALUATE
VAR Today = TODAY()
VAR MaxTerms = DATEDIFF(
MIN('DIM_SalesforceProject'[GoLiveDate]),
Today,
YEAR
)
RETURN
ADDCOLUMNS(
GENERATE(
GENERATESERIES(
1,
MaxTerms
),
SELECTCOLUMNS(
'DIM_SalesforceProject',
"Contract_StartDate", 'DIM_SalesforceProject'[GoLiveDate],
"ProjectCode", 'DIM_SalesforceProject'[ProjectCode]
)
),
"Value", [Value],
"Term_StartDate", DATEADD(
'DIM_SalesforceProject'[GoLiveDate],
[Value] - 1,
YEAR
),
"Term_EndDate", DATEADD(
'DIM_SalesforceProject'[GoLiveDate],
[Value],
YEAR
) - 1
)
Only throws an obvious error.
I cannot refer to a colum added.
For some reason Go Live Date is "blank" for future dates...
hi , please share some sample of the pbix to go more
Hi,
Its fairly straight forward.
Its just 2 values like my exampe :
"GoLiveDate" & "PartnerCode"
| 01/07/2022 | 0ngNDS2zvw |
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 68 | |
| 33 | |
| 32 | |
| 31 |