This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
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"
| Person | Totaled Score |
| Jim | 123 |
| Mike | 234 |
| Greg | 345 |
| Jessica | 64 |
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!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated measure.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated measure.
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/
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |