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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Single score dashboard using a SharePoint list with a yes/no answers

I’m trying to build a single score dashboard using a SharePoint list of 14 questions in columns  with a yes/no answers in rows. If they comply with all 14, then they will be given a score of “5” and in they failed to follow more than 3 out of the 14 then they were given a score of “1”. See breakdown below:

# of non-conformancesScore
05
14
23
32
>31

 

Can Anyone assist me?

1 ACCEPTED SOLUTION

Hi @Anonymous 

In Edit queries,

Select "NAME" column, "Unpivot other columns",

Rename "Attribute", "question" as "Value", "answer", Close&&apply,

Capture5.JPG

 

Create measure

no numbers = 
VAR n =
    CALCULATE (
        COUNT ( 'Table'[question] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[NAME] = MAX ( 'Table'[NAME] )
                && 'Table'[answer] = "no"
        )
    )
RETURN
    IF ( ISBLANK ( n ), 0, n )

score = 
SWITCH (
    TRUE (),
    [no numbers] = 0, 5,
    [no numbers] = 1, 4,
    [no numbers] = 2, 3,
    [no numbers] = 3, 2,
    [no numbers] > 3, 1
)

Capture6.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Assume you have example data below:

Capture3.JPG

Create measures

 

no numbers =
VAR n =
    CALCULATE (
        COUNT ( 'Table'[question id] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[name] = MAX ( 'Table'[name] )
                && 'Table'[result] = "no"
        )
    )
RETURN
    IF ( ISBLANK ( n ), 0, n )

score =
SWITCH (
    TRUE (),
    [no numbers] = 0, 5,
    [no numbers] = 1, 4,
    [no numbers] = 2, 3,
    [no numbers] = 3, 4,
    [no numbers] > 3, 1
)

 

Capture2.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Team,

 

Sorry but i'm not a tec savy person however the list has the questions in colums and the answers in rows like below:

 

NAMEQ1Q2Q3Q4Q5Q6Q7Q8Q9Q10Q11Q12Q13Q14
Johnnononoyesyesyesyesyesyesyesyesyesyesyes
Jacknoyesyesyesyesyesyesyesyesyesyesyesyesyes

 

the result anticipated is:

 

NameScore
John2
Jack4

 

Any taughts

Hi @Anonymous 

In Edit queries,

Select "NAME" column, "Unpivot other columns",

Rename "Attribute", "question" as "Value", "answer", Close&&apply,

Capture5.JPG

 

Create measure

no numbers = 
VAR n =
    CALCULATE (
        COUNT ( 'Table'[question] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[NAME] = MAX ( 'Table'[NAME] )
                && 'Table'[answer] = "no"
        )
    )
RETURN
    IF ( ISBLANK ( n ), 0, n )

score = 
SWITCH (
    TRUE (),
    [no numbers] = 0, 5,
    [no numbers] = 1, 4,
    [no numbers] = 2, 3,
    [no numbers] = 3, 2,
    [no numbers] > 3, 1
)

Capture6.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.