Forum Discussion
Date Segmentations based on multiple measures
First, we need to create a calculated column instead of a measure since the scatter chart legend field only accepts column references. Let's create a new column named 'Product Type' in your table.
Here's a DAX formula for the 'Product Type' column:
Product Type =
VAR SalesRank = [Sales Rank]
VAR MarginRank = [Margin Rank]
RETURN
IF(
(SalesRank >= 950 && SalesRank <= 1050) && (MarginRank >= 950 && MarginRank <= 1050), "CORE",
IF(
(SalesRank >= 850 && SalesRank < 950) && (MarginRank >= 850 && MarginRank < 950), "VITAL",
IF(
(SalesRank >= 0 && SalesRank < 850) && (MarginRank >= 850 && MarginRank <= 1050), "POOR",
IF(
(SalesRank >= 0 && SalesRank < 850) && (MarginRank >= 0 && MarginRank < 850), "BAD",
BLANK()
)
)
)
)
This formula checks the Sales Rank and Margin Rank of each product and assigns it to one of the four categories. If a product doesn't fit into any of the categories, it will return a blank value.
Once you've added this column, you can use the 'Product Type' column in the Legend Field of your scatter chart to visually showcase the segmentation over time. This way, each product will be color-coded based on its segment, making it easy to see how products are distributed across the four categories over time.