Forum Discussion
OlegV
2 years agoHelper III
cannot create a calculated column with groupby, summarize, summarizecolumns
Hello, I am stuck with the code, please help me. I am createing a calculated table using variables. At a certain step, I need to group leftjoined tables and create a calculated column "ActualDel...
- 2 years ago
Here is a working solution:
var group_tab = ADDCOLUMNS( SUMMARIZE( join_tab, [SalesOrder], [OrderDate]), "TotalQty", SUMX(FILTER(join_tab,[SalesOrder] = EARLIER([SalesOrder])),[Quantity]), "ActuralDeliveryDate",if(COUNTROWS(FILTER(join_tab,[SalesOrder] = EARLIER([SalesOrder]) && ISBLANK([ActualDeliveryDate]))) > 0, BLANK(),MAXX(FILTER(join_tab,[SalesOrder] = EARLIER([SalesOrder]),[ActualDeliveryDate]) ) )
AnalyticPulse
2 years agoSolution Sage
Instead of trying to directly calculate the ActualDeliveryDate in a calculated table using variables, you might consider using measures to dynamically calculate it based on the context of your visuals.
can you provide sample data fo reference.
Learn Power BI free:
OlegV
2 years agoHelper III
AnalyticPulse
here is a link to sample pbi file
sample.pbix
I will not use this calculate table in any visual in power bi desktop. I will paste it to Powerbi report builder, and create a report.