locked
Filter results from a Slicer that calls a mesure RRS feed

  • Question

  • I seem unable to filter the data that is derived from my Slicer which uses the SWITCH command to call a measure.

    The results of the data are correct except that I cannot filter the information. The measure when used directly works fine, but not when called from a slicer.

    the Slicer DAX is as follows:

    =switch (TRUE,
    Min( Analysis1[ID] ) = 1,
    FORMAT([Cascade_Value_All],"$#,#0"))

    NOTE. The measure [Cascade_Value_All] works fine on its own and I have no problem filtering, but when I run the measure through the Slicer it brings in unwanted data

    Thanks

    Frank

    Wednesday, July 13, 2016 10:37 PM

Answers

  • Hi Darren

    Thanks for your reply. I have determined the issue. Its that a measure can only have 1 format type.  Once you convert the output to text, (which is what happens when I use the FORMAT option) it is ALL TEXT so  a BLANK() cannot be returned as an alternative.

    Thanks

    Frank

    • Proposed as answer by Charlie Liao Sunday, July 24, 2016 2:41 AM
    • Marked as answer by Charlie Liao Sunday, July 24, 2016 9:45 AM
    Monday, July 18, 2016 3:58 PM

All replies

  • I'm not entirely sure I understand your issue, but I'm guessing that it may be to do with the fact that your measure will bring in all ID values for the grand total. If this is your issue I think the following logic which only calculates the measure where the ID = 1 might fix your issue.

    =CALCULATE( [Cascade_Value_All], FILTER( Analysis1, Analysis1[ID]=1) )

    Otherwise if you can show an example of what you mean by "brings in unwanted data" that might help us understand your issue.


    http://darren.gosbell.com - please mark correct answers

    • Proposed as answer by Charlie Liao Sunday, July 24, 2016 2:41 AM
    • Marked as answer by Charlie Liao Sunday, July 24, 2016 9:45 AM
    • Unmarked as answer by FrankF11 Monday, July 25, 2016 3:30 PM
    Monday, July 18, 2016 4:43 AM
  • Hi Darren

    Thanks for your reply. I have determined the issue. Its that a measure can only have 1 format type.  Once you convert the output to text, (which is what happens when I use the FORMAT option) it is ALL TEXT so  a BLANK() cannot be returned as an alternative.

    Thanks

    Frank

    • Proposed as answer by Charlie Liao Sunday, July 24, 2016 2:41 AM
    • Marked as answer by Charlie Liao Sunday, July 24, 2016 9:45 AM
    Monday, July 18, 2016 3:58 PM