Forum Discussion

sceleton's avatar
sceleton
Frequent Visitor
4 years ago
Solved

Comparing any 2 versions' value in the same column via a Matrix visual

Hi,   I have a table similar to below one. [ForecastTable] Version Month Value A Jan 123 A Feb 456 A Mar 123 B Feb 456 B Mar 123 B Apr 456 C Feb 123 C ...
  • sceleton's avatar
    sceleton
    4 years ago

    Hi amitchandak ,

     

    Thanks for replying. It is good to learn a new way to get any 2 versions  comparison works.

    I tried this new method however the new calculated measure (the comparison one) still can not be transferred into the same column in matrix visual.
    I am thinking I need a way to unpivot it but the selectcolumns does not work for calculated measure.

    Any other ideas?

  • mahoneypat's avatar
    4 years ago

    Here is one way to do it. Make two disconnected tables (no relationships) with the values of your Version column with 

     

    Slicer1 = DISTINCT(Data[Version])
    and
    Slicer2 = DISTINCT(Data[Version])
     
    Make two slicers with the version columns from those two tables. Make a matrix with the Version and Month columns from your original table, along with this measure to get the result shown.
     
    Value With Slicers =
    VAR vSlicer1 =
        VALUES( Slicer1[Version] )
    VAR vSlicer2 =
        VALUES( Slicer2[Version] )
    RETURN
        CALCULATE(
            SUM( Data[Value] ),
            KEEPFILTERS( Data[Version] IN UNION( vSlicer1vSlicer2 ) )
        )
     

    Pat