March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
In the above image in column 2 want to calculate the % using the subtotal of the parental row
for example the subtotal is 11 and i want to calculate (2-11)/11
Solved! Go to Solution.
Hi @chkapelis ,
According to your description, you want to calculate (2-11)/11 in the subtotal of the parent term, can you describe in detail what the 2 is based on? You have three values of 2,4,5 in the sub term, how is the 2 determined? If it is the minimum value, please try this:
Measure =
var _a = SUM('Table'[Value])
var _b = CALCULATE(MIN('Table'[Value]),ALLEXCEPT('Table','Table'[ID]))
Return IF(ISINSCOPE('Table'[ID-2]),_a,DIVIDE((_b-_a),_a))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @chkapelis ,
According to your description, you want to calculate (2-11)/11 in the subtotal of the parent term, can you describe in detail what the 2 is based on? You have three values of 2,4,5 in the sub term, how is the 2 determined? If it is the minimum value, please try this:
Measure =
var _a = SUM('Table'[Value])
var _b = CALCULATE(MIN('Table'[Value]),ALLEXCEPT('Table','Table'[ID]))
Return IF(ISINSCOPE('Table'[ID-2]),_a,DIVIDE((_b-_a),_a))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please try this:
Measure with subtotal =
IF(HASONEVALUE('Your table'[KOKOPOY]),
[Your measure],
FORMAT([Your division],"+0\ %;-0\ %;+0\ %")
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
25 | |
18 | |
15 | |
9 | |
8 |
User | Count |
---|---|
37 | |
32 | |
16 | |
16 | |
12 |