Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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!