Forum Discussion

smpa01's avatar
smpa01
Community Champion
2 years ago
Solved

Matrix Manipulation

I have a matrix which returns this

But I want to manipulate in such a way so that it brings only {factTwo} for month1  and {factOne,factTwo} for  month2. My desired output is below

month 1 2 2
category factTwo factOne factTwo
cat3                  14,021                       621                  14,021
cat4                  14,021                       621                  14,021

 

I tried to achieve this with Tabular Editor but I caould not make it work. Is it possible to achieve?

Thank you in advance.

parry2k bcdobbs 

  • smpa01 you can easily achieve this with calculation groups.

     

    here is a high level of how you will do it, assuming you have two measures called "Measure Fact 1" and "Measure Fact 2"

     

    - create a calculation group with two calculation items, let's call those fact 1 and fact 2

    - in fact 1 calculation item, you will check if the selected value = month 1 then return blank else return "measure fact 1"

    - in fact 2 you will always return "measure fact 2"

     

    on matrix visual:

     

    - category on rows

    - month and column from new calculation group 

    - in value, use any one measure

     

    Please try and let me know if you run into any issues.

     

    Cheers!

2 Replies

  • smpa01 you can easily achieve this with calculation groups.

     

    here is a high level of how you will do it, assuming you have two measures called "Measure Fact 1" and "Measure Fact 2"

     

    - create a calculation group with two calculation items, let's call those fact 1 and fact 2

    - in fact 1 calculation item, you will check if the selected value = month 1 then return blank else return "measure fact 1"

    - in fact 2 you will always return "measure fact 2"

     

    on matrix visual:

     

    - category on rows

    - month and column from new calculation group 

    - in value, use any one measure

     

    Please try and let me know if you run into any issues.

     

    Cheers!

    • smpa01's avatar
      smpa01
      Community Champion

      parry2k  this is so awesome; worked like a charm. Thanks for the help.

       

      I wasted a lot of time today trying to figure this out on my own.

       

      Thanks a lot again for saving the rest of the day.