Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Guys,
I am pretty new to power BI and please help me for this formula. I'd like to create the formula Needed to selling to meet Target =100-parent sales, but I don't want the formula works for child level. Because our target is based on parent level. So how can I avoid the formula calculate child name. For example, the formula only show Parent A and B, not show A1,A2,B1,B2...
Thanks.
Parent | Child | Sales | Needed to selling to meet Target |
A |
| 96 | =100-96 |
| A1 | 64 |
|
| A2 | 32 |
|
B |
| 45 | =100-45 |
| B1 | 13 |
|
| B2 | 32 |
|
| B3 | 45 |
|
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
Measure =
var x1=100-CALCULATE(SUM(P_C[Sales]),ALLEXCEPT(P_C,P_C[Parent]))
return
IF(HASONEVALUE(P_C[Sales]),BLANK(),x1)
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, you can create a measure as follows.
Measure =
var x1=100-CALCULATE(SUM(P_C[Sales]),ALLEXCEPT(P_C,P_C[Parent]))
return
IF(HASONEVALUE(P_C[Sales]),BLANK(),x1)
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , You should able to that with help from isinscope
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |