cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DCSupport Frequent Visitor
Frequent 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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 287 members 3,410 guests
Please welcome our newest community members: