Forum Discussion
Anonymous
8 years agoNot applicable
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...
- 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
v-jiascu-msft
Microsoft Employee
8 years agoHi 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
Anonymous
8 years agoNot applicable
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 MS%] ),
BLANK (),
FORMAT ( [CB MS%], "0.0%;(0.0%)" )
)
)
)
Had to make one change to get it to work, but that did the trick! What does it only need to be applied to that measure?
THANKS!
- v-jiascu-msft8 years ago
Microsoft Employee
Hi Anonymous,
Please refer to format-function-dax.
>>>If value is BLANK() the function returns an empty string.
Best Regards,
Dale