Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I need your help in the following:
I want to do another column /measure to have Opportunity X sum as 39486.96 and Opportunity Y sum as 60735.6, how can I achieve that? There are a lot of opportunities though not only X and Y.
Opportunity NameExpected Value CurrencyExpected Value
X | USD | 39486.96 |
X | USD | 39486.96 |
X | USD | 39486.96 |
X | USD | 39486.96 |
X | USD | 39486.96 |
X | USD | 39486.96 |
X | USD | 39486.96 |
Y | USD | 60735.6 |
Y | USD | 60735.6 |
Y | USD | 60735.6 |
Y | USD | 60735.6 |
Y | USD | 60735.6 |
Y | USD | 60735.6 |
Y | USD | 60735.6 |
Thanks,
Amr
Hi @Anonymous ,
First of all, I want to know if the data you gave is the original data.
If it did not the original data, I made an attempt with the following data.
Expected Value = CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Opportunity ]))
Average =CALCULATE(AVERAGE('Table'[Value]),ALLEXCEPT('Table','Table'[Opportunity ]))
If it's still not the result you want, please share the raw data with me and let me know about your thoughts.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Community Support Team _ Polly
@Anonymous If you need SUMIF, you can do it like:
SUMX(FILTER('Table',[Opportunity Name] = "X"),[Value])
Excel to DAX Translation - Microsoft Power BI Community
Hello @Anonymous, it seems that you're looking for an equivalemnt of Excel's SUMIF. Am I right?
I believe you'll find an answer after carefully reading this article - How CALCULATE works in DAX - SQLBI. I'm convinced that it will help you a lot in the future, so it definitely worth to invest some time in understading this material.
Good luck with learning DAX! And let us know if you still have doubts after reading it 🙂
@Anonymous , Not very clear
if you have Expected Value
then a measure
sumx(summarize(Table, Table[Opportunity Name], Table[Expected Value] ), [Expected Value])
If not then new column
Expected Value = if([Opportunity Name] = "X" , 39486.96,60735.6)
Thank you :)) , This one worked sumx(summarize(Table, Table[Opportunity Name], Table[Expected Value] ), [Expected Value]). The problem I couldnt calculate the average of this function.
Expected Value = if([Opportunity Name] = "X" , 39486.96,60735.6) --> this one assumes I only have to opportunity names, which is not the case.
I have multiple opportunity names, Expected Values.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |