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())
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
amustafa
Solution Sage
2 years agoUpdate 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())