Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ permissionset 36955 "Power BI Embedded - Objects"
page "Inventory by Serial No." = X,
page "PowerBI Bin Contents" = X,
page "Bin Contents by Item Tracking" = X,
page "PowerBI ABC Analysis" = X,
page "Projects Overview" = X,
page "Project Tasks" = X,
page "Project Profitability" = X,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ permissionset 36951 "PowerBi Report Basic"
query "Resources - PBI API" = X,
query "Assembly Headers - Order" = X,
query "Assembly Lines - Item" = X,
query "ABC Analysis Setup - PBI API" = X,
query Bins = X,
query "Calendar Entries" = X,
query "Capacity Ledger Entries" = X,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ pageextension 36962 "Warehouse Manager Role Center" extends "Warehouse Manager R
RunObject = page "Inventory Forecasting";
Tooltip = 'Open the Power BI Report that predicts your inventory trends, including forecasting of quantity across item, location and inventory posting groups.';
}
action("ABC Analysis (Power BI)")
{
ApplicationArea = Basic, Suite;
Caption = 'ABC Analysis (Power BI)';
Image = "PowerBI";
RunObject = page "PowerBI ABC Analysis";
Tooltip = 'Open the Power BI Report that performs an ABC analysis of your sales data, categorizing customers based on their contribution to total sales.';
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ pageextension 36956 "Whse. Basic Role Center" extends "Whse. Basic Role Center"
RunObject = page "Inventory Forecasting";
Tooltip = 'Open the Power BI Report that predicts your inventory trends, including forecasting of quantity across item, location and inventory posting groups.';
}
action("ABC Analysis (Power BI)")
{
ApplicationArea = Basic, Suite;
Caption = 'ABC Analysis (Power BI)';
Image = "PowerBI";
RunObject = page "PowerBI ABC Analysis";
Tooltip = 'Open the Power BI Report that performs an ABC analysis of your sales data, categorizing customers based on their contribution to total sales.';
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.Inventory.PowerBIReports;

using Microsoft.Inventory.Analysis;

query 37022 "ABC Analysis Setup - PBI API"
{
Access = Internal;
Caption = 'Power BI ABC Analysis Setup';
QueryType = API;
APIPublisher = 'microsoft';
APIGroup = 'analytics';
ApiVersion = 'v1.0';
EntityName = 'abcAnalysisSetup';
EntitySetName = 'abcAnalysisSetups';
DataAccessIntent = ReadOnly;

elements
{
dataitem(abcAnalysisSetup; "ABC Analysis Setup")
{
column(categoryA; "Category A")
{
}
column(categoryB; "Category B")
{
}
column(categoryC; "Category C")
{
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace Microsoft.PowerBIReports;

using System.Integration.PowerBI;

page 37111 "PowerBI ABC Analysis"
{
UsageCategory = ReportsAndAnalysis;
ApplicationArea = All;
PageType = UserControlHost;
Caption = 'ABC Analysis';
AboutTitle = 'About ABC Analysis';
AboutText = 'The ABC Analysis page provides insights into customer segmentation based on sales volume, helping to identify key customers and prioritize sales efforts.';

layout
{
area(Content)
{
usercontrol(PowerBIAddin; PowerBIManagement)
{
ApplicationArea = All;

trigger ControlAddInReady()
begin
SetupHelper.InitializeEmbeddedAddin(CurrPage.PowerBIAddin, ReportId, ReportPageLbl);
end;

trigger ReportLoaded(ReportFilters: Text; ActivePageName: Text; ActivePageFilters: Text; CorrelationId: Text)
begin
SetupHelper.LogReportLoaded(CorrelationId);
end;

trigger ErrorOccurred(Operation: Text; ErrorText: Text)
begin
SetupHelper.LogError(Operation, ErrorText);
SetupHelper.ShowPowerBIErrorNotification(Operation, ErrorText);
end;
}
}
}

var
SetupHelper: Codeunit "Power BI Report Setup";
ReportId: Guid;
ReportPageLbl: Label 'a476d6afc8d5d544193b', Locked = true;

trigger OnOpenPage()
var
PowerBIReportsSetup: Record "PowerBI Reports Setup";
begin
SetupHelper.EnsureUserAcceptedPowerBITerms();
ReportId := SetupHelper.GetReportIdAndEnsureSetup(CurrPage.Caption(), PowerBIReportsSetup.FieldNo("Sales Report Id"));
end;
}

Loading