Forum Discussion
BBIUser
Helper IV
2 years agoDynamic text based on masked data in the table
Hello, I need to create a dynamic text based on few masked data which is already in the table. Sample Data: I have created a measure to not to show the data on the bar charts based on the...
- 2 years ago
Update the measure as following...
DisplayMessage = VAR EmployeeCountMoreThanOne = CALCULATE(COUNTROWS('Sheet1'), 'Sheet1'[Employee Count] > 1) VAR IsAnyRowMasked = CALCULATE(MAXX('Sheet1', IF('Sheet1'[Masked] = "Yes", 1, 0)), ALLSELECTED('Sheet1')) = 1 RETURN IF(EmployeeCountMoreThanOne > 0 && NOT IsAnyRowMasked, "Data Masked", BLANK())
amustafa
Solution Sage
2 years agoCreate a measure as following..
DisplayMessage =
VAR EmployeeCountMoreThanOne = CALCULATE(COUNTROWS('Table1'), 'Table1'[Employee Count] > 1)
VAR IsMasked = CALCULATE(MAX('Table1'[Masked]), ALL('Table1')) = "No"
RETURN
IF(EmployeeCountMoreThanOne > 0 && IsMasked, BLANK(), "Data Masked")
BBIUser
Helper IV
2 years agoamustafa Appreciate your reply!
The card value is not changing to 'Blank' when the filters are changed to Race in Group Category. None of the values under Race are Masked. So, the card should not show 'Data Masked'.
I tried attaching the .pbix file for troubleshoot.
https://drive.google.com/file/d/15NSWkqo6bPDhZZPIUwq-V2ZwuEUfXMXm/view?usp=drive_link
- amustafa2 years ago
Solution Sage
Update the measure as following...
DisplayMessage = VAR EmployeeCountMoreThanOne = CALCULATE(COUNTROWS('Sheet1'), 'Sheet1'[Employee Count] > 1) VAR IsAnyRowMasked = CALCULATE(MAXX('Sheet1', IF('Sheet1'[Masked] = "Yes", 1, 0)), ALLSELECTED('Sheet1')) = 1 RETURN IF(EmployeeCountMoreThanOne > 0 && NOT IsAnyRowMasked, "Data Masked", BLANK())