cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DCSupport
Regular Visitor

How to achive this Total Adjusted Score in Power BI

Hi there

 

I have a user model in Excel: 

 

RequirementVendor 1Vendor 2Vendor 3Vendor 4
T Requirement 110445
T Requirement 21591615
T Requirement 31952111
T Requirement 41251413
T Requirement 510366
T Requirement 62043
T Requirement 784168
T Requirement 8102811
     
Total T Score86328972
Total T Adjusted Score48185040

 

So the Total T Score is just of SUM score for each vendor WHILE Total T Adjusted Score is calculated based on each (Total T Score / Max of Total T Score) * 50 .

For example for Vendor 1: (86 / 89) * 50 = 48

 

Started to shape this data into Fact/Dims

 

ScoreFact

 

Score Type KeyRequirement KeyVendor 1Vendor 2Vendor 3Vendor 4
TS-01TR-0110456
TS-01TR-021481514
TS-01TR-031952012
TS-01TR-041241512
TS-01TR-0510357
TS-01TR-063152
TS-01TR-0784159
TS-01TR-08103910
FS-01FR-01180000.0080000.00900000.0040000.00
FS-01FR-022000000.001400000.001600000.003800000.00
FS-01FR-03280000.00400000.00500000.00190000.00

 

then we pivoting this so the column will be Score Type Key, Requirement Key, Vendor, Score

 

ScoreTypeDim

 

Score Type KeyNameRanking PercentageOrder Display
TS-01T Score50%1
FS-01F Score50%2

 

RequirementDim

 

Requirement KeyRequirementOrder Display
TR-01T Requirement 11
TR-02T Requirement 22
TR-03T Requirement 33
TR-04T Requirement 44
TR-05T Requirement 55
TR-06T Requirement 66
TR-07T Requirement 77
TR-08T Requirement 88
FR-01F Requirement 11
FR-02F Requirement 22
FR-03F Requirement 33

 

So back to Excel model, created the Measurement for 

Total Score = SUM(ScoreFact[Score])
Total Score Max = MAXX(SUMMARIZE(ScoreFact,ScoreFact[Vendor],"Adjusted Score",SUM(ScoreFact[Score])),[Adjusted Score])
Total Adjusted Score = ([Total Score]/[Total Score Max])*50
 
Turn out the display in Matrix for the Total T Adjusted Score is below and is not correct. They are all 50s. ?!?!
 
NameVendor 1Vendor 2Vendor 3Vendor 4
T Score 50505050
 
How do I achive this? Any ideas?
 
UPDATE:
How to make the Total Score Max static ?
 
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
v-piga-msft Resident Rockstar
Resident Rockstar

Re: How to achive this Total Adjusted Score in Power BI

Hi @DCSupport ,

If I understand your scenario correctly, the first table is your desired output, which you want to achieve in PowerBI. And the ScoreFact, ScoreTypeDim, RequirementDim are the source tables  you already have in PowerBI now?

If that’s the case/ If so, I’m afraid you need to create the calculated table first and then create the measure below.

Table = SUMMARIZE (
        ScoreFact,
        ScoreFact[Vendor],
        "Adjusted Score", SUM ( ScoreFact[Value] )
    )
maxtotal = 
MAXX (
    'Table',
   MAX( [Adjusted Score])
)
Total Adjusted Score =
VAR a =
    CALCULATE (
        SUM ( 'ScoreFact'[Value] ),
        ALLEXCEPT ( ScoreFact, 'ScoreFact'[Vendor] )
    )
RETURN
    DIVIDE ( a, [maxtotal] ) * 50

Then you could get the output.

Capture.PNG

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
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

1 REPLY 1
v-piga-msft Resident Rockstar
Resident Rockstar

Re: How to achive this Total Adjusted Score in Power BI

Hi @DCSupport ,

If I understand your scenario correctly, the first table is your desired output, which you want to achieve in PowerBI. And the ScoreFact, ScoreTypeDim, RequirementDim are the source tables  you already have in PowerBI now?

If that’s the case/ If so, I’m afraid you need to create the calculated table first and then create the measure below.

Table = SUMMARIZE (
        ScoreFact,
        ScoreFact[Vendor],
        "Adjusted Score", SUM ( ScoreFact[Value] )
    )
maxtotal = 
MAXX (
    'Table',
   MAX( [Adjusted Score])
)
Total Adjusted Score =
VAR a =
    CALCULATE (
        SUM ( 'ScoreFact'[Value] ),
        ALLEXCEPT ( ScoreFact, 'ScoreFact'[Vendor] )
    )
RETURN
    DIVIDE ( a, [maxtotal] ) * 50

Then you could get the output.

Capture.PNG

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
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

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors