The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi Team,
Appreciate you giving your expertise in the below, I have been trying for a while now 😞
I have opportunites, their value, and type. I want to sum by type for each unique opportunity ID.
For Ex: HW= 200 for opp A + 100 for opp C + 400 for opp D = 700
I use this
Opportunity ID | Value | Type |
A | 200 | HW |
A | 200 | HW |
A | 200 | HW |
A | 200 | HW |
B | 500 | SW |
B | 500 | SW |
C | 100 | HW |
C | 100 | HW |
D | 400 | HW |
TTT | 700 | SW |
DD | 300 | SW |
DD | 300 | SW |
Thanks,
Amr
Solved! Go to Solution.
Hi @Anonymous ,
Please try:
Total Value =
var _t=SUMMARIZE('masterdata',[Opportunity ID],[Value],[Type])
return SUMX(FILTER(_t,[Type]=MAX([Type])),[Value])
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try:
Total Value =
var _t=SUMMARIZE('masterdata',[Opportunity ID],[Value],[Type])
return SUMX(FILTER(_t,[Type]=MAX([Type])),[Value])
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Try:
Total Value= maxx(summarize(masterdata, masterdata[Type], "__Value", SUM(masterdata[Value]) ), [__Value])
That said, this is all about context. If you just place Type in a visual and use a simple SUM('masterdata'[Value]) then your numbers should come out correct according to Type.
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
30 |
User | Count |
---|---|
181 | |
88 | |
71 | |
48 | |
46 |