Forum Discussion

akshbhala's avatar
akshbhala
New Member
3 years ago
Solved

Diagonal Calculation with multiple columns and dates involved

Hi, I am trying to solve an interesting and challenging problem.  mth   1.C 2.A 3.B 4.D  5.E 2021-09   1100 4800       2021-10   2000 3000 4000     2021-11   3000 4000 ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    HI akshbhala,

    You can do unpivot columns on your fields to convert them to attribute and value, then remove the character to only keep number in your attribute fields.

    Unpivot columns - Power Query | Microsoft Learn

    After these steps, you can create segment table with different ranges and use with raw table field and new table segment to create matrix. Then you can write a measure to look up and calculate value based on current category and segment.

    Dynamic segmentation – DAX Patterns
    Regards,

    Xiaoxin Sheng