Forum Discussion

JustinDoh1's avatar
JustinDoh1
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Trying to separate value by the rows

I am sharing my Pbix file here.

 

I am trying to work with financial statement, and trying to allocate values based on "Financial" (category).

So,

If it is "Census - Med A", it will show 1000.

If it is "Census - Med HMO", it will show 2000.

 

 

I have Two (type of) measures:

 

 

The issue is that, it sums up everything (1000+2000+...6000) = 21K, instead of dividing into different line item (on the visual):

This is expected output:

 

 

I was following this YouTube channel, but I am not sure what I am missing.

 

Thanks.

 

 

  • JustinDoh1 , Based on what I got, Change the measure like

    Financial Value = 
    Sumx( Values('Structure'[Line Item ID]), CALCULATE( SWITCH(
        SELECTEDVALUE('Structure'[Line Item ID]),
        "Census - Med A", [Census - Med A],
        "Census - Med HMO", [Census - Med HMO]
     )))
    

3 Replies

  • JustinDoh1 , Based on what I got, Change the measure like

    Financial Value = 
    Sumx( Values('Structure'[Line Item ID]), CALCULATE( SWITCH(
        SELECTEDVALUE('Structure'[Line Item ID]),
        "Census - Med A", [Census - Med A],
        "Census - Med HMO", [Census - Med HMO]
     )))
    
    • JustinDoh1's avatar
      JustinDoh1
      Icon for Post Prodigy rankPost Prodigy

      amitchandak 

      Thanks for help.

      I modified the measure like you mentioned, but I am still getting 21000.

      What am I missing?

      Thanks.

       

       

      • JustinDoh1's avatar
        JustinDoh1
        Icon for Post Prodigy rankPost Prodigy

        amitchandak 

        I realized that measure for each calculation was wrong:

        I changed to this:

        It is now working.