Dax/Measure Help when using Switch

Anything related to PowerPivot and DAX Formuale
Posts: 1
Joined: Wed Jul 29, 2020 6:55 am

Dax/Measure Help when using Switch

Postby ryanjilka » Wed Jul 29, 2020 11:54 pm

I wrote a measure using switch and selectedvalue and am trying to return another measure as a result. I am using this measure on a graph for limits based on what slicers are chosen.

My first measure is:

SDProtien = (STDEV.P(SAMP_TEST_RESULT[NIR Protein Bias])) (which equals 0.39)

My second measure that uses the above measure is:

SEP_Protien = switch(SELECTEDVALUE(SAMP_TEST_RESULT[SEP_KEY]),"CM_DDG Weekly Composite", 0.89,"CM_Slurry Blender Weekly Composite", 0.56,"FB_DDG Weekly Composite", 0.61,"FB_Slurry Blender Weekly Composite", 0.6,"FM_DDG Weekly Composite", 0.59,"FM_FM",0.31,"FM_NexPro QC",[SDProtien],"FM_NexPro Weekly Composite", 0.31, 0)

When my slicer are any of the above for example "CM_DDG Weekly Composite", a line at 0.89 appears on the graph. However when "FM_Nexpro QC" is selected a line at zero appears on the graph. Why is zero appearing instead of 0.39, which is the result of that measure?

I would be greatful for any help on this issue.



Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 4 guests