Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Visual showing blank rows using SELECTEDVALUE and FORMAT Function

I have a couple of matrix visuals that I am trying to condesnse into one using a slicer and SELECTEDVALUE to change the data in the table.  I was trying to clean up with the output with the FORMAT Fu...
  • v-jiascu-msft's avatar
    8 years ago

    Hi Anonymous,

     

    We only need to add a condition like below.

    CB Data =
    IF (
        SELECTEDVALUE ( 'CB Selection'[CB Selection] ) = "Eaches",
        FORMAT ( [CB Eaches], "#,##0;(#,##0)" ),
        IF (
            SELECTEDVALUE ( 'CB Selection'[CB Selection] ) = "Net Sales",
            FORMAT ( [CB Contract Value], "$#,##0;($#,##0)" ),
            IF (
                ISBLANK ( 'CB Selection'[CB Selection] ),
                BLANK (),
                FORMAT ( [CB MS%], "0.0%;(0.0%)" )
            )
        )
    )
    

    Best Regards,

    Dale