Forum Discussion
Anonymous
1 year agoNot applicable
TMDL Script to update multiple tables
Can one TMDL script update measures in more than one table. I get a syntax error when I add a second ref table
- Anonymous1 year ago
The above worked once I updated Power BI Desktop to the latest build. Here is the full script:
createOrReplace ref table Sales measure 'Sales Amount by Due Date' = CALCULATE(SUM(Sales[Sales Amount]), USERELATIONSHIP(Sales[DueDateKey],'Date'[DateKey])) * 3 formatString: \$#,0.###############;(\$#,0.###############);\$#,0.############### ref table 'Sales Order' measure test2 = CALCULATE(Sales[Sales Amount by Due Date],Sales[Sales Amount]>0) *2 annotation PBI_FormatHint = {"isGeneralNumber":true}
Anonymous
1 year agoNot applicable
The above worked once I updated Power BI Desktop to the latest build. Here is the full script:
createOrReplace
ref table Sales
measure 'Sales Amount by Due Date' = CALCULATE(SUM(Sales[Sales Amount]), USERELATIONSHIP(Sales[DueDateKey],'Date'[DateKey])) * 3
formatString: \$#,0.###############;(\$#,0.###############);\$#,0.###############
ref table 'Sales Order'
measure test2 = CALCULATE(Sales[Sales Amount by Due Date],Sales[Sales Amount]>0) *2
annotation PBI_FormatHint = {"isGeneralNumber":true}v-nmadadi-msft
1 year agoCommunity Support
Hi Anonymous ,
We really appreciate your efforts and for letting us know the update on the issue.
Please mark your reply as the solution so as to help other community members who may face similar issue in the future.
Please continue using fabric community forum for your further assistance.