Forum Discussion
Dynamic Data Masking to anonymize data
- 1 year ago
I think you can use something like
Sum Value = SUM( 'Table'[Column2]) Show Value = IF( NOT ISINSCOPE('Table'[Column1]), FORMAT( SUM('Table'[Column2]), "#,#" ), VAR CurrentTotal = [Sum Value] VAR Ranking = RANK( SKIP, ALLSELECTED('Table'[Column1]), ORDERBY( [Sum Value], ASC ) ) VAR Result = IF( Ranking <= 2 || CurrentTotal < 5, "N/A", FORMAT( CurrentTotal, "#,#" ) ) RETURN Result )Use the [Show Value] measure in your matrix and it will show values only when the value is >= 5 or the current row is not in the bottom 2 ranked by the value.
I think that the FORMAT functions are necessary because you can't have a measure returning multiple data types - e.g. whole number and string.
I think you can use something like
Sum Value = SUM( 'Table'[Column2])
Show Value =
IF(
NOT ISINSCOPE('Table'[Column1]),
FORMAT(
SUM('Table'[Column2]),
"#,#"
),
VAR CurrentTotal = [Sum Value]
VAR Ranking = RANK(
SKIP,
ALLSELECTED('Table'[Column1]),
ORDERBY(
[Sum Value],
ASC
)
)
VAR Result = IF(
Ranking <= 2 || CurrentTotal < 5,
"N/A",
FORMAT(
CurrentTotal,
"#,#"
)
)
RETURN
Result
)
Use the [Show Value] measure in your matrix and it will show values only when the value is >= 5 or the current row is not in the bottom 2 ranked by the value.
I think that the FORMAT functions are necessary because you can't have a measure returning multiple data types - e.g. whole number and string.
- Anonymous1 year agoNot applicable
Thanks a lot i think it answers the question, i think i just asked the question poorly so i'll do another post much more detailed. Thanks anyway for your time