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
paopau86
New Member

Issues with bar & line chart

Hi - I created a stacked bar/line chart to show two sets of data, the first column (bars) show dates when someone contacted me, and the second column (line) shows when an actual meeting was scheduled. The chart seems to be having problems when the contact and meeting happened in different months, e.g. if someone contacted me on 11/15/2018 and the meeting was scheduled on 12/5/2018, the chart is showing the contact in November, which is accurate, but it is showing that the meeting also happened in November, which is inaccurate. Any thoughts on how to solve this?

 

Thanks,

Paola

1 ACCEPTED SOLUTION

Hi @paopau86

1. Open Edit queries

click on columns "contact" and "meeting", select "transform"->unpivot columns

then i get the following table

15.png

close &apply

2.

create a new table, enter the formula in the formula bar in"Home"->"new table"

date = CALENDARAUTO()

create a relationsip between this date table and my data table

16.png

3. create two measures

contacts = CALCULATE(DISTINCTCOUNT(Sheet5[company]),FILTER(Sheet5,Sheet5[Attribute]="contact"))

meeting = CALCULATE(DISTINCTCOUNT(Sheet5[company]),FILTER(Sheet5,Sheet5[Attribute]="meeting"))

17.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @paopau86

Based on my experience, it seems you didn't use the chart correctly.

please share a simple dataset as an example and tell me what you need to see from the visual, so that i can reproduce your scenario and help you create the correct visual.

 

Best Regards

Maggie

Thank you so much for the responses - I am new user of Power BI and I am trying to learn as I go (planning on taking a course soon), I appreciate your assistance. 

Below is a sample of the information I want to show in a chart. Basically, I would like to show in a bar how many people I contacted every month (e.g. August would have two contacts and in september 1) and then in a line show how many meetings occurred on the given month (one meeting in August, and two in september).

 

Thanks again!

Paola

 

 

Sample data.PNG

 

Hi @paopau86

1. Open Edit queries

click on columns "contact" and "meeting", select "transform"->unpivot columns

then i get the following table

15.png

close &apply

2.

create a new table, enter the formula in the formula bar in"Home"->"new table"

date = CALENDARAUTO()

create a relationsip between this date table and my data table

16.png

3. create two measures

contacts = CALCULATE(DISTINCTCOUNT(Sheet5[company]),FILTER(Sheet5,Sheet5[Attribute]="contact"))

meeting = CALCULATE(DISTINCTCOUNT(Sheet5[company]),FILTER(Sheet5,Sheet5[Attribute]="meeting"))

17.png

 

Best Regards

Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Super User
Super User

Very tough without example data and expected output. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

That being said, see if these quick measures help:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

Top Solution Authors
Top Kudoed Authors