Forum Discussion
In Context operator equivalent in Power BI
Hi,
I have created a formula in Business Objects which i want to replicate in DAX power bi but not sure how to do this. Can anyone offer some help/advice on how i can do this.
The formula in Business objects is:
=Count([SSA ASC - Step ID])In([First Contact].[Person Details - Person ID];[SSA First Contact - Workflow ID])Where([SSA ASC - Step Status]="COMPLETED") + Count([SSA ASC Follow Up - Step ID])In([First Contact].[Person Details - Person ID];[SSA First Contact - Workflow ID])Where([SSA ASC Follow Up - Step Status]="COMPLETED")
kind regards
Hetal
3 Replies
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Hi lbendlin
I am not sure how to attach a sample file.
I want to replicate the above measure used in Business Objects into power bi. I have tried to split the above into 2 separate measures:
first measure = CALCULATE(DISTINCTCOUNTNOBLANK('First Contact'[Advice & Support KI_STEP_ID]),'First Contact'[Advice & Support STEP_STATUS]="COMPLETED")
second measure = CALCULATE(DISTINCTCOUNTNOBLANK('First Contact'[Followup KI_STEP_ID]),'First Contact'[Followup STEP_STATUS]="COMPLETED")I now need to add the 2 measures so measure created as: total measure = first measure + second measureUp to this point i works. However i now need to create 3 measures:Total Measure is 1 = CALCULATE(DISTINCTCOUNTNOBLANK('First Contact'[First Contact WORKFLOW_ID]),FILTER('First Contact',[Measure 3]=1))Total measure is 2 = CALCULATE(DISTINCTCOUNTNOBLANK('First Contact'[First Contact WORKFLOW_ID]),FILTER('First Contact',[Measure 3]=2))Total measure is 3 or more = CALCULATE(DISTINCTCOUNTNOBLANK('First Contact'[First Contact WORKFLOW_ID]),FILTER('First Contact',[Measure 3]>=3))This gives me the below result:Month Nov Total Measure is 1 75 Total Measure is 2 9 Total Measure is 3 or more I am expecting this result:Nov Total Measure is 1 73 Total Measure is 2 4 Total Measure is 3 or more 5 For some reason, the maximum count is 2 which is wrong.