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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.