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
StuartSmith
Power Participant
Power Participant

Show % of cells with data per table row.

I have a table visual with multiple colums containg "Text", "Numerical" data, etc. and would like to show a coulmn that shows a % data bar of cells that contain data.  How can this be done? Thanks in advance.

 

NameCountryCityAgeCompleted
Sid SnotUKLondon45100%
John Doe New York 50%
Jane DoeSpainMadrid 75%
Micky Mouse   25%
Buck RodgersUSWashington22100%
1 ACCEPTED SOLUTION

Hi @StuartSmith ,

 

You can try this method:

Add a index column, and add these columns:

isnotblankA =
IF (
    CALCULATE (
        MAX ( 'Table'[Age] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)
isnotblankCity =
IF (
    CALCULATE (
        MAX ( 'Table'[City] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)
isnotblankCoun =
IF (
    CALCULATE (
        MAX ( 'Table'[Country] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)

 

isnotblankN =
IF (
    CALCULATE (
        MAX ( 'Table'[Name] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)

 Then new a measure:

Completed =
SUMX (
    SUMMARIZE (
        'Table',
        'Table'[isnotblankN],
        'Table'[isnotblankCoun],
        'Table'[isnotblankCity],
        'Table'[isnotblankA]
    ),
    'Table'[isnotblankA] + 'Table'[isnotblankCity] + 'Table'[isnotblankCoun] + 'Table'[isnotblankN]
) / 4

vyinliwmsft_1-1669773323239.png

 

The result is:

vyinliwmsft_0-1669773252197.png

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
StuartSmith
Power Participant
Power Participant

Anyone? 🙂

Hi @StuartSmith ,

 

You can try this method:

Add a index column, and add these columns:

isnotblankA =
IF (
    CALCULATE (
        MAX ( 'Table'[Age] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)
isnotblankCity =
IF (
    CALCULATE (
        MAX ( 'Table'[City] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)
isnotblankCoun =
IF (
    CALCULATE (
        MAX ( 'Table'[Country] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)

 

isnotblankN =
IF (
    CALCULATE (
        MAX ( 'Table'[Name] ),
        FILTER ( 'Table', 'Table'[Index] = EARLIER ( 'Table'[Index] ) )
    )
        = BLANK (),
    0,
    1
)

 Then new a measure:

Completed =
SUMX (
    SUMMARIZE (
        'Table',
        'Table'[isnotblankN],
        'Table'[isnotblankCoun],
        'Table'[isnotblankCity],
        'Table'[isnotblankA]
    ),
    'Table'[isnotblankA] + 'Table'[isnotblankCity] + 'Table'[isnotblankCoun] + 'Table'[isnotblankN]
) / 4

vyinliwmsft_1-1669773323239.png

 

The result is:

vyinliwmsft_0-1669773252197.png

Hope these help you.

Here is my PBIX file.

 

Best Regards,

Community Support Team _Yinliw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

That worked great 🙂 I was trying to get it working in 1 measure, instead of mutiple measures, etc.

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.