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
Syndicate_Admin
Administrator
Administrator

Inability to create a chart with different marketing campaigns

Good evening, again.

In the database that I have been provided with to make a panel on marketing campaigns there are 5 columns with values " 0 and 1 ", which mean respectively " Not Accepted and Accepted ".

To proceed to get the sum of the values 0 and 1 create a dimensional table for each campaign from "Specify data" and put the following columns

- Campaign acceptance (in two lines): 0 and 1,

- Acceptance group: "Not accepted and accepted", and

- Status: Negative and Positive

Then perform the following DAX measurements for each of the campaigns:

- Average Campaign Acceptance 1 = AVERAGE('Th_Campañas'[Aceptación_Campaña 1])

- Total Campaign Acceptance 1 = CALCULATE([Total Customers],'D_Aceptación_Campaña 1'[Status] = "Positive" )

- Total Rejection Campaign 1 = CALCULATE([Total Customers],'D_Aceptación_Campaña 1'[Status] = "Negative" )
It is supposed that when I create a graph I should get the sum of the 2240 customers, but it is not like that, apart from the fact that it does not distinguish between positive and negative, it accumulates everything.
I've tried putting on the X axis "Status" and on the Y axis "total acceptance and rejection" but the graph doesn't come out right, I don't know what can go wrong.
Attached screenshot of the table.
Thanks a lot
Captura de pantalla 2024-03-20 214029.png
3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Thank you

Syndicate_Admin
Administrator
Administrator

Hello, good morning.

First thank you for answering my problem.

In the campaign panel I have put several cards to verify the sum of each of the campaigns "Accepted and not accepted" and each one of them perfectly adds the number of customers, but when I made the graphs I kept getting the same error, until I have already seen that if I put these totals first on the Y axis I would get it right, but putting "Status" on the X-axis is when the error arises, so I think the problem must come from there.

Thank you so much for everything

Attached screen

Captura de pantalla 2024-03-21 132818.png

v-binbinyu-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

Please try below steps:

1. Verify DAX Measures: Double-check the DAX measures you've created for any logical errors or misreferences. Ensure that the 'Status' column is correctly categorized in your dimensional table and that the measures are accurately calculating the totals based on this categorization.

 

2. Chart Setup: When setting up your chart, ensure that the 'Status' column is placed on the Axis (usually the X-axis for bar charts) and that your measure for Total Acceptance and Total Rejection is placed in the Values area. This setup should theoretically split the data into two categories based on the 'Status' and display the respective sums.

 

3. Review Chart Type: Some chart types may not display the data as expected based on their design. Consider trying different chart types (e.g., stacked bar chart, clustered column chart) that might better represent the categorization and aggregation you're aiming for.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.