Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Working with Salesforce Objects.
I would like to have a new field to define accounts that are considered clients of ours.
I want to create a new field in Account to check if there is any related opportunities where IsWon = True, and return a true/false response.
I am new to DAX, and currently doing some reading through other posts, but if someone could give me a few pointers, would really appreicate it.
[Is this account a client] = IF Opportunities.IsWon + True, return True
Solved! Go to Solution.
Hi @simonGIS , assume that these are your data, you can create the next calculated column on your Customer table:
IsCustomer = var IdCustomer=Accounts[ACCOUNT] return IF(CALCULATE(COUNTROWS(Opportunities);FILTER(Opportunities;Opportunities[Account]=IdCustomer && Opportunities[IsWon]=True))>0;"TRUE";"FALSE")
Best Regards,
Miguel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @simonGIS , assume that these are your data, you can create the next calculated column on your Customer table:
IsCustomer = var IdCustomer=Accounts[ACCOUNT] return IF(CALCULATE(COUNTROWS(Opportunities);FILTER(Opportunities;Opportunities[Account]=IdCustomer && Opportunities[IsWon]=True))>0;"TRUE";"FALSE")
Best Regards,
Miguel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks.
Can you help me understand the best practise to apply this.
My feeling is that for the entire report, I will only care about the identified clients, so perhaps makes sense to do this in the edit queries section? However this would require converting the DAX to M language, any chance you can provide some pointers on what that might look like?
I had an issue trying to apply this as a new measure:
Creating a new column in Account table from Data View, initially fails when I use ;
But if I change these to , then it executes.
Any reason? I saw another post that suggests ; is preferred.
"assume that these are your data"
I am using the Salesforce connector to grab the data using my credentials.
Hi, on the first hand, you must change my "," per ";".
I have used just a calculated column and when I talked about data, it was just a example (you can use your connector without problems).
Try again and talk me about the results.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
68 | |
60 | |
51 | |
36 | |
35 |
User | Count |
---|---|
84 | |
71 | |
56 | |
45 | |
43 |