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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
neil37
Advocate I
Advocate I

Calculated Column or Measure Question

Hello, 

 

I believe I am on the way to solving this but need that extra push from the great forum that this is. 

 

If I have a dataset that resembles the below calculated table named "cTbl_TotalScoreCalculate"

 

PersonTotaled Score
Jim123
Mike234
Greg345
Jessica64

 

And I wanted to create either a measure or a calculated column that executed this function:

=(A1 - MIN(A:A)) / (MAX(A:A) - MIN(A:A))

 

What would I add in the syntax for what would be the bold red variable below?

 

 I have the following syntax created but I am strugling with getting the syntax to calculate:

ScaledValue =
VAR MaxScore = MAX(cTbl_TotalScoreCalculate[Totaled Score])
VAR MinScore = MIN(cTbl_TotalScoreCalculate[Totaled Score])
Return
CALCULATE(((A1)-MinScore)/ (MaxScore - MinScore))

Caveats: The table where this calculated column is being generated is a calculated Table. 

 

Thank you for your assistance!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated measure.

 

Picture2.png

 

Expected result: =
VAR _min =
CALCULATE ( MIN ( cTbl_TotalScoreCalculate[Totaled Score] ), REMOVEFILTERS () )
VAR _max =
CALCULATE ( MAX ( cTbl_TotalScoreCalculate[Totaled Score] ), REMOVEFILTERS () )
RETURN
IF (
HASONEVALUE ( cTbl_TotalScoreCalculate[Person] ),
DIVIDE ( SUM ( cTbl_TotalScoreCalculate[Totaled Score] ) - _min, _max - _min )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

3 REPLIES 3
neil37
Advocate I
Advocate I

Thank you @Jihwan_Kim  & @VahidDM !!  Greatly appreciate your time and effort!!

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated measure.

 

Picture2.png

 

Expected result: =
VAR _min =
CALCULATE ( MIN ( cTbl_TotalScoreCalculate[Totaled Score] ), REMOVEFILTERS () )
VAR _max =
CALCULATE ( MAX ( cTbl_TotalScoreCalculate[Totaled Score] ), REMOVEFILTERS () )
RETURN
IF (
HASONEVALUE ( cTbl_TotalScoreCalculate[Person] ),
DIVIDE ( SUM ( cTbl_TotalScoreCalculate[Totaled Score] ) - _min, _max - _min )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

VahidDM
Super User
Super User

Hi @neil37 

 

Try this to add a new column with DAX:

 

ScaledValue =
VAR MaxScore = calculate(MAX(cTbl_TotalScoreCalculate[Totaled Score]),all(cTbl_TotalScoreCalculate))
VAR MinScore = calculate(MIN(cTbl_TotalScoreCalculate[Totaled Score]),all(cTbl_TotalScoreCalculate))
Var _A1 = EARLIER ( cTbl_TotalScoreCalculate[Totaled Score] )

Return
(_A1-MinScore)/ (MaxScore - MinScore)

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: 
www.linkedin.com/in/vahid-dm/

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.