Forum Discussion

Dave82's avatar
Dave82
Frequent Visitor
4 years ago
Solved

Yes/No dropdown not working

I have a REEL_QUALITY table with an isOutlier column of values 0 or 1 Customer wants a dropdown to 'Show Outliers' with options Yes/No for a line chart. Where yes shows all rows in the table, and no...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Dave82 ,

    I created some data:

    Here are the steps you can follow:

    1. Use Enter data to create a table.

    2. Create measure.

    Flag =
    var _select=SELECTEDVALUE('SliceTable'[Slice])
    var _1=CALCULATE(SUM('REEL_QUALITY'[isOutlier]),FILTER(ALL(REEL_QUALITY),'REEL_QUALITY'[Date]=MAX('REEL_QUALITY'[Date])))
    return
    IF(
       _select="No"&&MAX('REEL_QUALITY'[isOutlier])=1,0,1)

    3. Place [Flag]in Filters, set is=1, apply filter.

    4. Result:

    When the slicer is Yes, display all data:

    When the slicer is No, the data displayed as 0:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly