Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello Fabric Community,
I am trying to perform the BCG "Share Growth Matrix" classification on my dataset (What Is the Growth Share Matrix? | BCG). For example, I want to classify customers basing on their [Volume CP] and [Volume Δ] like this:
Growth Share Classification =
SWITCH(
TRUE(),
[Volume CP] >= [Volume CP PR67] && [Volume Δ] >= [Volume Δ PR67], "Star",
[Volume CP] < [Volume CP PR67] && [Volume Δ] >= [Volume Δ PR67], "Question Mark",
[Volume CP] >= [Volume CP PR67] && [Volume Δ] < [Volume Δ PR67], "Cash Cow",
[Volume CP] < [Volume CP PR67] && [Volume Δ] < [Volume Δ PR67], "Dog",
BLANK()
)
Where "PR67" means a percentile ranking above 67% among customers. (Detailed dataset description in the next paragraph)
I want the value of PR67 subject to slicers. For example, when user select a particular Sales Team, the value should reflect only customer orders from that team.
For my dataset, each row is an invoice line, with the following relevant fields:
Date, Sales Team, Volume, Item, Customer.
To define "growth", I've implemented parameters that let the user choose which periods to compare, and came up with 2 measures:
Volume CP (Total volume for the current period) and Volume LP (Total volume for the last period)
Volume CP =
VAR YearParam = 'Current Year'[Current Year Value]
VAR MonthParam = 'Current Month'[Current Month Value]
VAR DayParam = 'Current Day'[Current Day Value]
VAR FirstOfMonth = DATE(YearParam, MonthParam, 1)
VAR LastOfMonth = EOMONTH(FirstOfMonth, 0)
VAR LastDayOfMonth = DAY(LastOfMonth)
VAR SafeDay =
IF(DayParam > LastDayOfMonth, LastDayOfMonth, DayParam)
VAR CurrentDate = DATE(YearParam, MonthParam, SafeDay)
VAR TimeRes = SELECTEDVALUE('Period Selection Table'[Time Resolution Table])
VAR CalcType = SELECTEDVALUE('Range Type Table'[Range Type]) -- "To Date" or "Rolling"
VAR MinRollingDate =
SWITCH(
TimeRes,
"Year", EDATE(CurrentDate, -12),
"Quarter", EDATE(CurrentDate, -3),
"Month", EDATE(CurrentDate, -1),
BLANK()
)
RETURN
SWITCH(
TRUE(),
-- Year To Date
TimeRes = "Year" && CalcType = "To Date",
CALCULATE(
SUM(FCT_INVOICES[TONS_raw]),
FILTER(
FCT_INVOICES,
YEAR(FCT_INVOICES[DATE]) = YearParam
)
),
-- Quarter To Date
TimeRes = "Quarter" && CalcType = "To Date",
CALCULATE(
SUM(FCT_INVOICES[TONS_raw]),
FILTER(
FCT_INVOICES,
YEAR(FCT_INVOICES[DATE]) = YEAR(CurrentDate) &&
QUARTER(FCT_INVOICES[DATE]) = QUARTER(CurrentDate)
)
),
-- Month To Date
TimeRes = "Month" && CalcType = "To Date",
CALCULATE(
SUM(FCT_INVOICES[TONS_raw]),
FILTER(
FCT_INVOICES,
YEAR(FCT_INVOICES[DATE]) = YearParam &&
MONTH(FCT_INVOICES[DATE]) = MonthParam
)
),
-- Rolling
CalcType = "Rolling",
CALCULATE(
SUM(FCT_INVOICES[TONS_raw]),
FILTER(
FCT_INVOICES,
FCT_INVOICES[DATE] > MinRollingDate &&
FCT_INVOICES[DATE] <= CurrentDate
)
),
BLANK()
)
Volume Δ = [Volume CP] - [Volume LP]
Customer | Volume CP | Volume Δ |
Apple | 5 | -1 |
3 | 0 | |
Amazon | 12 | 5 |
... | ... | ... |
Solved! Go to Solution.
Hi @TzuChiao26,
Thank you for reaching out to the Microsoft Fabric Forum Community.
You're trying to classify customers into BCG Growth Share Matrix categories (e.g., Star, Dog, Cash Cow, Question Mark) in Power BI using measures like Volume cp and VolumeΔ
(Change), below is the .PBIX file attached for your reference.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi @TzuChiao26,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @TzuChiao26,
Thank you for reaching out to the Microsoft Fabric Forum Community.
You're trying to classify customers into BCG Growth Share Matrix categories (e.g., Star, Dog, Cash Cow, Question Mark) in Power BI using measures like Volume cp and VolumeΔ
(Change), below is the .PBIX file attached for your reference.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
User | Count |
---|---|
84 | |
78 | |
70 | |
47 | |
41 |
User | Count |
---|---|
108 | |
53 | |
50 | |
40 | |
40 |