Forum Discussion

TJKF's avatar
TJKF
Frequent Visitor
4 years ago
Solved

Adding an extra column to a matrix chart

I have a matrix chart that has a list of companys and then sales, market potential and share of wallet in different product categories. There are also some conditional formatting in the SOW column. A...
  • ToddChitt's avatar
    4 years ago

    Add a table to the model (either in Power Query or DAX) that aggregates the main table by Company and Product Group. Get the MAX(Sale Date) as an aggregated column. Now create a calculated column in this table and the main table that is a concatenation of Company and Product Group. Example: [My Join Column] = [Company] + "-" + [Product Group]. Join the aggregated table to this one on the new columns. 

     

    You cannot calculate this Alarm column in the context of a single row in your main table. Why? Suppose you have a sale that is 3 years old. For that, Alarm = Yes. Then you also have a sale that was a month ago. Alarm = No for that row. You need the first row to now say No becasuse of the recent sale.