Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

SELECTEDVALUE not Calculating

I'm having an issue with what should be a pretty simple calculation. I have a Calculated Column ( 0-$ ) that calculates a $ amount by way of looking at a related tables percentage. That is working fine. I'd like to have that calculation be multiplied by a SELECTEDVALUE Measure that is looking at a seperate slicer table and is selected by a slicer. I cannot get that aspect to work as it yeilds blanks in the column that was previously working.

 

I've tried changing formats, adding VALUES, putting the calculation in a Variable... to no avail. 

 

Here's a capture of the calculation working prior to introducing the SELECTEDVLAUE into it:

 
 

 

Here's a capture after I add in my SELECTEDVALUE Measure:

 

Thoughts and feedback appreciated. 

 

Thank you,

-Nate

  • Calculated columns do not refresh with slicer changes.  Are you referencing SELECTEDVALUE in a column expression?  If so, that won't work, but you can likely do your column calculation as a measure (if column not used as legend, axis, etc.).

    Regards,

    Pat

     

2 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Calculated columns do not refresh with slicer changes.  Are you referencing SELECTEDVALUE in a column expression?  If so, that won't work, but you can likely do your column calculation as a measure (if column not used as legend, axis, etc.).

    Regards,

    Pat

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Pat,

      That was it, thank you. I ended up with this expression and it worked. 

      0-$ (M) = (SUMX(Project,Project[LEFT TO SPEND])*SUMX(RELATEDTABLE(Profile),Profile[0]))*Variable[SelectedVariable]