Forum Discussion
how do I sum data by week from different tables
Hi Amy,
I tried the WEEKNUM function, but it was telling me it is not allowed as part of calculated column DAX expressions on DirectQuery models.
is there any workaround while keeping it as Direct Query?
Also, the "E on dock" and "W on dock"
"DF MMR" and "RF MMR" are measures I created, both from different tables.
Hi Anonymous ,
Based on my test connect to SQL Server Data base using Directquery mode, the WEEK function worked fine, could you show me the error message?
For the measures, you can use SUMX(table,[measure]) function.
Sum Per Week = CALCULATE(SUMX('sum field Table', [Your sum field]),FILTER(ALLSELECTED('DataTable'),'DataTable'[Week]=MAX('DataTable'[Week])))
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.