Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |