User Profile
cgrimes
Advocate II
Joined 7 years ago
User Widgets
Contributions
Re: Error MDXScript(model)(201,9) with LINESTX in DAX Formula
well, it was a weird fix, it did not like that I was using summarizecolumns, had to change to summarize Next Month Fill2 = VAR Fit = LINESTX( CALCULATETABLE( SUMMARIZE( 'Date Master', 'Date Master'[FirstOfMonth], "Sales", SUM('Data Sales'[Net Amount (USD)]), "WDays", SUM('Date Master'[WorkDay]), "RRS", CALCULATE([d day $ RRQR per Workday], 'Measures MMT'[Catagory] = "Sales"), "SoMLBL", [start of month latBL]^.5, "SoMOD", [StartOfMonthOrdersDue] ), ALL('Date Master'), 'Date Master'[FirstOfMonth] >= EOMONTH(MIN(TODAY(),MAX('Date Master'[Date])), -14) + 1, 'Date Master'[FirstOfMonth] <= EOMONTH(MIN(TODAY(),MAX('Date Master'[Date])), -2) + 1 ) , [Sales], [WDays], [RRS], [SoMLBL], [SoMOD] ) VAR Slope1 = SELECTCOLUMNS( Fit , [Slope1]) VAR Slope2 = SELECTCOLUMNS( Fit , [Slope2]) VAR Slope3 = SELECTCOLUMNS( Fit , [Slope3]) VAR Slope4 = SELECTCOLUMNS( Fit , [Slope4]) VAR Intercept = SELECTCOLUMNS( Fit , [Intercept]) VAR x1 = CALCULATE(SUM('Date Master'[WorkDay])) VAR x2 = CALCULATE( [d day $ RRQR per Workday], 'Measures MMT'[Catagory] = "Sales", PREVIOUSMONTH('Date Master'[Date]) ) VAR x3 = [start of month latBL]^.5 VAR x4 = [StartOfMonthOrdersDue] VAR y = Slope1 * x1 + Slope2 * x2 + Slope3 * x3 + Slope4 * x4 + Intercept RETURN y1.1KViews0likes0CommentsRe: Error MDXScript(model)(201,9) with LINESTX in DAX Formula
I got the same error, I have a diferent version that was working but behaving unexpectedly when filtered on the date table. it used the selectcolumn() without issue. Next Month Fill = VAR Fit = LINESTX( CALCULATETABLE( VALUES('Date Master'[FirstOfMonth]), ALLSELECTED('Date Master'), 'Date Master'[FirstOfMonth] >= EOMONTH(MAX('Date Master'[Date]), -14) + 1, 'Date Master'[FirstOfMonth] <= EOMONTH(MAX('Date Master'[Date]), -2)+1 ), VAR CurrentFirstOfMonth = 'Date Master'[FirstOfMonth] -- Capture the current [FirstOfMonth] value RETURN CALCULATE( SUM('Data Sales'[Net Amount (USD)]), ALLSELECTED('Date Master'), 'Date Master'[FirstOfMonth] = CurrentFirstOfMonth ), VAR CurrentFirstOfMonth = 'Date Master'[FirstOfMonth] -- Capture the current [FirstOfMonth] value RETURN CALCULATE( SUM('Date Master'[WorkDay]), ALLSELECTED('Date Master'), 'Date Master'[FirstOfMonth] = CurrentFirstOfMonth ), VAR CurrentFirstOfMonth = EDATE('Date Master'[FirstOfMonth],-1)-- Capture the current [FirstOfMonth] value RETURN CALCULATE( [d day $ RRQR per Workday], 'Measures MMT'[Catagory] = "Sales", ALLSELECTED('Date Master'), 'Date Master'[FirstOfMonth] = CurrentFirstOfMonth ), VAR CurrentFirstOfMonth = 'Date Master'[FirstOfMonth] -- Capture the current [FirstOfMonth] value RETURN CALCULATE( [start of month latBL]^.5, ALLSELECTED('Date Master'), 'Date Master'[FirstOfMonth] = CurrentFirstOfMonth ), VAR CurrentFirstOfMonth = 'Date Master'[FirstOfMonth] -- Capture the current [FirstOfMonth] value RETURN CALCULATE( [StartOfMonthOrdersDue], ALLSELECTED('Date Master'), 'Date Master'[FirstOfMonth] = CurrentFirstOfMonth ) ) VAR Slope1 = SELECTCOLUMNS( Fit , [Slope1]) VAR Slope2 = SELECTCOLUMNS( Fit , [Slope2]) VAR Slope3 = SELECTCOLUMNS( Fit , [Slope3]) VAR Slope4 = SELECTCOLUMNS( Fit , [Slope4]) VAR Intercept = SELECTCOLUMNS( Fit , [Intercept]) VAR x1 = CALCULATE(SUM('Date Master'[WorkDay])) VAR x2 = CALCULATE( [d day $ RRQR per Workday], 'Measures MMT'[Catagory] = "Sales", PREVIOUSMONTH('Date Master'[Date]) ) VAR x3 = [start of month latBL]^.5 VAR x4 = [StartOfMonthOrdersDue] VAR y = Slope1 * x1 + Slope2 * x2 + Slope3 * x3 + Slope4 * x4 + Intercept RETURN y1.1KViews0likes1CommentError MDXScript(model)(201,9) with LINESTX in DAX Formula
I am working on a DAX formula in Power BI to perform a linear regression analysis using the LINESTX function. The goal is to predict next month's sales based on several variables from previous data. However, I am encountering an error: MDXScript(model)(201,9) when I try to run my formula. Below is the DAX formula I am using: Next Month Fill2 = VAR Fit = LINESTX( CALCULATETABLE( SUMMARIZECOLUMNS( 'Date Master'[FirstOfMonth], "Sales", SUM('Data Sales'[Net Amount (USD)]), "WDays", SUM('Date Master'[WorkDay]), "RRS", CALCULATE([d day $ RRQR per Workday], 'Measures MMT'[Catagory] = "Sales"), "SoMLBL", [start of month latBL]^.5, "SoMOD", [StartOfMonthOrdersDue] ), ALL('Date Master'), 'Date Master'[FirstOfMonth] >= EOMONTH(MIN(TODAY(),MAX('Date Master'[Date])), -14) + 1, 'Date Master'[FirstOfMonth] <= EOMONTH(MIN(TODAY(),MAX('Date Master'[Date])), -2) + 1 ) , [Sales], [WDays], [RRS], [SoMLBL], [SoMOD] ) VAR Slope1 = SELECTCOLUMNS( Fit , [Slope1]) VAR Slope2 = SELECTCOLUMNS( Fit , [Slope2]) VAR Slope3 = SELECTCOLUMNS( Fit , [Slope3]) VAR Slope4 = SELECTCOLUMNS( Fit , [Slope4]) VAR Intercept = SELECTCOLUMNS( Fit , [Intercept]) VAR x1 = CALCULATE(SUM('Date Master'[WorkDay])) VAR x2 = CALCULATE( [d day $ RRQR per Workday], 'Measures MMT'[Catagory] = "Sales", PREVIOUSMONTH('Date Master'[Date]) ) VAR x3 = [start of month latBL]^.5 VAR x4 = [StartOfMonthOrdersDue] VAR y = Slope1 * x1 + Slope2 * x2 + Slope3 * x3 + Slope4 * x4 + Intercept RETURN y I would greatly appreciate any insight into what might be causing this error and how I can resolve it. Thank you in advance for your help!Solved1.2KViews2likes3Commentsautomatic rotating visual carousel for tooltips
It would be great if tooltips could have more content without having to take up more screen space. One way to do this is to allow the creation of a tooltip carousel, where a tooltip would cycle through a list of tooltip report pages, allowing the creation of multiple data insights.Visual filtering interaction is causing errors
When I select an item from the table, all visuals fail. same an all tabs, report was functioning normally yesterday Feedback Type: Frown (Error) Timestamp: 2022-01-05T15:43:17.9371156Z Local Time: 2022-01-05T10:43:17.9371156-05:00 Session ID: 465d9882-9521-4a1d-89ea-0deb83b60be0 Release: December 2021 Product Version: 2.100.785.0 (21.12) (x64) OS Version: Microsoft Windows NT 10.0.19044.0 (x64 en-US) CLR Version: 4.7 or later [Release Number = 528372] Peak Virtual Memory: 57.5 GB Private Memory: 2.62 GB Peak Working Set: 2.28 GB IE Version: 11.789.19041.0 User ID: 5c410b3b-6aaf-4bb7-a748-8aaa7d40f489 Workbook Package Info: 1* - en-US, Query Groups: 1, fastCombine: Disabled, runBackgroundAnalysis: False. Telemetry Enabled: True Model Default Mode: Import Model Version: PowerBI_V3 Enabled Preview Features: PBI_shapeMapVisualEnabled PBI_azureMapVisual PBI_enableWebView2 PBI_sparklines Disabled Preview Features: PBI_SpanishLinguisticsEnabled PBI_qnaLiveConnect PBI_dataPointLassoSelect PBI_compositeModelsOverAS PBI_dynamicParameters PBI_enhancedTooltips PQ_WebView2Connector PBI_useModernFormatPane PBI_scorecardVisual Disabled DirectQuery Options: TreatHanaAsRelationalSource Cloud: GlobalCloud DPI Scale: 100% Supported Services: Power BI359Views0likes1CommentRe: Can't get filters to work properly for Snapshot Customer life cycle table
I found a solution! The challenge was that when I charted the "data orders" against the date axis, it filtered the customers based on the order date! So I needed to get a filtered list of all customers regardless of the date. I changed my measure to do just that: # Lost Customers = var custlist = CALCULATETABLE(SUMMARIZE('Data Orders',[Customer_Number-Seq]),ALL('Date Master')) Return CALCULATE ( COUNTROWS( CustomerEvents ), KEEPFILTERS(CustomerEvents[Event] = "Lost" ), TREATAS(custlist,CustomerEvents[Customer_Number-Seq]) )*-1 adding the summarized 'Data Orders" table for the unique customer IDs that included ALL dates did the trick. I then used TREATAS to provide the relationship I was looking for. Now filters and slicers work as expected.1KViews0likes0Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.