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.
There are two colums:
Sales and Job Phase
Job Phase has the following statuses: Confirmed, In Process, and In Field.
I need to create a column where it adds up the sales only when Job Phase = confirmed or in process.
Can someone please help me what would be the correct syntax to add in the query editor? Thank you!
Solved! Go to Solution.
I changed it to this:
ConfirmedInProcess Total = CALCULATE(Sum('SF Project Report'[Sales.amount]),'SF Project Report'[Job Phase]=Confirmed||'SF Project Report'[Job Phase]=In Process)
And it says Syntax for "In" is incorrect
You lost the quotes now on the strings (Confirmed -> "Confirmed", In Process -> "In Process")
You have several ways of doing this. First, I got this raw data:
Then I can get grouping and sum like this:
Than I can filter like this:
And I can also have a measure like this:
Sales For Phases 1 and 2 = CALCULATE(SUM(SalesHistory[Sales]), SalesHistory[Phase] = 1 || SalesHistory[Phase] = 2)
Thank you for your help. I tried to set it up like this:
ConfirmedInProcess Total = CALCULATE(Sum('SF Project Report'[Sales.amount]),'SF Project Report'[Job Phase]='Confirmed'||'SF Project Report'[Job Phase]='In Process'))
but I'm getting a syntax error. Any ideas?
Extra right bracket at the end?
I changed it to this:
ConfirmedInProcess Total = CALCULATE(Sum('SF Project Report'[Sales.amount]),'SF Project Report'[Job Phase]=Confirmed||'SF Project Report'[Job Phase]=In Process)
And it says Syntax for "In" is incorrect
You lost the quotes now on the strings (Confirmed -> "Confirmed", In Process -> "In Process")
Got it working. Thanks!
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 |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |