Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
onurkrbck
Regular Visitor

Power BI DAX formula for multiselect CRM field

Hi All,

 

I don't have much experience at Power BI desktop and but need to complete below task.

I have a multi select option field in Dynamics CRM and this field is being used to calculate targets.

 

Field name : Target

Field Type: Multiselect option

Let's say options of this field: ABC, DEF, GHI

 

Salespersons can select all of them, or one or more of these options for a sales. I am trying to build a chart to show open opportunities' totals seperately with "ABC", "DEF", "GHI" target option selected in.

 

Since another option can be selected as well in the opportunity records, I could not make this calculation with my current knowledge.

 

 RevenueTarget Option
Record 1$1000ABC
Record 2$2000ABC; DEF
Record 3$3000ABC; DEF; GHI

 

I want DAX to give me the results of:

$6000 for Target ABC

$5000 for Target DEF

$3000 for Target GHI

 

My aim is to show them on a column chart.

Thanks for your responses in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

2 REPLIES 2
onurkrbck
Regular Visitor

Hi @amitchandak ,

 

Thanks for your reply. I tried, and it worked.

 

Maybe you can help me again at the next step.

Here is my extended table;

 RevenueTarget1Target2Target3
Record 1$1000ABC  
Record 2$2000ABCDEF 
Record 3$3000ABCDEFGHI

 

I am trying to SUM of the Revenue values of the records which Target "DEF" has been choosen in.

For this example, calculation must give me $5000 result but I could not able to accomplish the formula.

 

Measure = CALCULATE(SUM('opportunities'[Revenue],IF('opportunities'[Target1]="DEF" || 'opportunities'[Target2]="DEF" || 'opportunities'[Target3]="DEF"))

 

Where do I make mistkae at?

 

Thanks

 

amitchandak
Super User
Super User

@onurkrbck , Split the column by delimiters in power Query

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

Split Column Power Query: https://youtu.be/FyO9Vmhcfag

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.