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
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
v-piga-msft
Resident Rockstar
Resident Rockstar

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

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.

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.