Forum Discussion

AN2021's avatar
AN2021
Frequent Visitor
5 years ago
Solved

Change rows will get different result

Hi, I wonder why when I change the row I will got different result for my measure.

I have a table like this:

I create new measure:

Total Market Value at Scenario 0 =
CALCULATE(
SUM(Sheet2[Market Value])
,Sheet2[Scenario] = 0
)
In my visualization I will got different result if I change my row as below: It correct if I use Scenario as row, but incorrect if I change it to Scenario Desc.

Note: I cannot add filter by Scenario Desc as some Scenario can have different Scenario Desc.

My purpose is to add column or measuer which always show the total of Market Value form Scenario = 0.

 

Here I attached my pibx files in google drive

https://drive.google.com/file/d/1da4Hb08-4qbo2YwO9far5ouckRO-rSuu/view?usp=sharing

 

In case you cannot downlload from drive:

https://gofile.io/d/0xixDU

  • AN2021 

     

    That 23 is correct, but If you want to show 23 for all rows, when you add Scenario Desc to the matrix, just add REMOVEFILTERS(Sheet2[Scenari Desc] to your calculation.

     

    Try this measure:

     
     

     

    Total Market Value at Scenario 0 =
    CALCULATE (
        SUM ( Sheet2[Market Value] ),
        Sheet2[Scenario] = 0,
        REMOVEFILTERS ( Sheet2[Scenari Desc] )
    )
    ​

     

     

    Did I answer your question? Mark my post as a solution!

    Appreciate your Kudos  !!

3 Replies

  • Hi AN2021 

     

    It seems all Scenarios with Zero values belong to Base Case, and because of that, it shows 23 just for that line Item when you add Scenario Desc to the row .

    The total value in both Matrix is correct.

     

    I could not download your file, so please share it on https://gofile.io/

     

    Did I answer your question? Mark my post as a solution!

    Appreciate your Kudos  !!

     

     

    • AN2021's avatar
      AN2021
      Frequent Visitor

      I still dont get it, here I reupload my files

      https://gofile.io/d/0xixDU

      My Data is look like this: When I use Scenario the result its correct, but when I use Scenario Desc, result is incorrect.

       

      • VahidDM's avatar
        VahidDM
        Icon for Super User rankSuper User

        AN2021 

         

        That 23 is correct, but If you want to show 23 for all rows, when you add Scenario Desc to the matrix, just add REMOVEFILTERS(Sheet2[Scenari Desc] to your calculation.

         

        Try this measure:

         
         

         

        Total Market Value at Scenario 0 =
        CALCULATE (
            SUM ( Sheet2[Market Value] ),
            Sheet2[Scenario] = 0,
            REMOVEFILTERS ( Sheet2[Scenari Desc] )
        )
        ​

         

         

        Did I answer your question? Mark my post as a solution!

        Appreciate your Kudos  !!