Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ScottA1423
New Member

Suppressing data

I am building a dashboard that needs to suppress information when it may violate patient confidentiality. The dashboard includes the city of patients who present to the emergency department for accidental drug overdoses. A table in the dashboard displays the number of overdoses for each city/town for the filtered date range. We should not be displaying cities with less than 10 so as to protect patient confidentiality. Instead, I want the city/town name to display but with an "S" in the Values field (to indicate data suppression).

 

Can this be achieved using a new calculated column, measure, or should I create a whole new table? I've tried to create a bad IF formula to display "S" when the sum of Syndrome (overdoses) for the filtered Date Range is less than 10:

 

Here is something silly I've tried:

 

Column = IF(TOTALYTD('ED Visits for Overdose (ESSS)'[Syndrome])<10),'ED Visits for Overdose (ESSS)'[Date].[Date],'ED Visits for Overdose (ESSS)'[City],TODAY()),"S",SUM('ED Visits for Overdose (ESSS)'[Syndrome]))

Thank you!

1 ACCEPTED SOLUTION

Hi @ScottA1423

As i use your example, i replace "fewer than 10 " to "1", however it doesn't affect the result you want

Try this measure 

Measure =
IF (
    CALCULATE (
        SUM ( Table1[Drug Overdoses] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[City] ),
            Table1[Date] <= MAX ( 'Table'[Date] )
                && Table1[Date] >= MIN ( 'Table'[Date] )
        )
    )
        <= 1,
    "S",
    CALCULATE (
        SUM ( Table1[Drug Overdoses] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[City] ),
            Table1[Date] <= MAX ( 'Table'[Date] )
                && Table1[Date] >= MIN ( 'Table'[Date] )
        )
    )
)

66.png

Best Regards

Maggie

 

View solution in original post

5 REPLIES 5
v-juanli-msft
Community Support
Community Support

Hi @ScottA1423

From your formula, the number of overdoses for each city/town for the filtered date range is not exist directly within your table, it needs to calculate based on the city and date range, right?

Since I don’t know the data model, I make a test with a simple data below using the formula to create a calculated column

city with suppression =
IF ( [ number of overdoses] < 10, "S", [city name] )

 31.png

Could you offer more information as this article suggested so we could get an effective solution?

 

Best Regards

Maggie

Thank you I apologize for not providing enough detail! I did some searching to better explain my question, but first here is a sample of the applicable data. You'll see the date column is by date of an overdose occurence.

 

DateDrug OverdosesCity
Saturday, January 14, 20171Microsoftville
Friday, January 27, 20171Google Hollow
Monday, January 30, 20171Microsoftville
Monday, January 30, 20171Apple Orchard
Thursday, February 2, 20171Apple Orchard
Thursday, February 23, 20171Apple Orchard
Thursday, February 23, 20171Microsoftville
Saturday, March 4, 20171Google Hollow
Saturday, March 18, 20171Apple Orchard
Tuesday, April 4, 20171Apple Orchard

 

So what happens in my model is based on the date range the user filters for, a table visual populates with the City name and the total overdoses for that period. I am trying to set up a table that shows S instead of the number for fewer than 10 cases. See visuals below:

Date filter

Table

Hi @ScottA1423

As i use your example, i replace "fewer than 10 " to "1", however it doesn't affect the result you want

Try this measure 

Measure =
IF (
    CALCULATE (
        SUM ( Table1[Drug Overdoses] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[City] ),
            Table1[Date] <= MAX ( 'Table'[Date] )
                && Table1[Date] >= MIN ( 'Table'[Date] )
        )
    )
        <= 1,
    "S",
    CALCULATE (
        SUM ( Table1[Drug Overdoses] ),
        FILTER (
            ALLEXCEPT ( Table1, Table1[City] ),
            Table1[Date] <= MAX ( 'Table'[Date] )
                && Table1[Date] >= MIN ( 'Table'[Date] )
        )
    )
)

66.png

Best Regards

Maggie

 

Hi, great response, wondering if you can help with the following:

 

I need to suppress so that if less than a certain amount of participants have answered a certain question (when drilled down by slicers) it is not shown, but on top of that I need to suppress each graph to show that if less than 10 individuals answered a specific answer (out of a multiple choice of 7) then each individual bar should be suppressed and not shown.

Is it possible to have this be reflected in a stacked bar chart?
So if some value is fewer than 10, have the chart label in a stacked bar chart display the character "S"? Thank you. 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.