Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

FORMAT ignores filter

When I apply the FORMAT function in the following measure, my matrix visual ignores the slicer filter, and displays blank columns. Here is the measure code: ERMetricValue = var sel = SELECTEDVALUE...
  • v-eachen-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    You could use IF() to hide blank values.

    var ret =
    IF (
        val <> BLANK (),
        SWITCH (
            sel,
            "Preventable Percent", FORMAT ( val, "###%" ),
            "Avoidable Percent", FORMAT ( val, "###%" ),
            "Allowed Amount", FORMAT ( val, "$#,##0" ),
            "Paid Amount", FORMAT ( val, "$#,##0" ),
            "Visits", FORMAT ( val, "#,##0" ),
            "Avoidable", FORMAT ( val, "#,##0" ),
            "Preventable", FORMAT ( val, "#,##0" )
        )
    )