cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kcyiu Frequent Visitor
Frequent Visitor

Line and clustered column chart: how to show more data points

I wanted to build an analysis showing ticket price and # of tickets bought for a spefic air route by different air lines and cabin. Got the following data fields: Airline, (Total) Spend, Ticket count, Cabin type, Price as a measure defined as sum(spend)/sum(ticket count).

 

The screen shot is what I've been able to build so far. How can I make the line showing number of tickets bought for each cabin from each of the airlines? i.e. havint the same number of data points on the line as the number of columns.

 

Thanks for any advice

 

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-yuezhe-msft
Moderator

Re: Line and clustered column chart: how to show more data points

Hi @kcyiu,

If you want to show number of tickets bought for each cabin from each airline using Line in Line and clustered column chart, you would need  to create the following measures  and drag these measures to Line value section.

AA tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="AA"))
AC tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="AC"))
HU tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="HU"))
UA tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="UA"))

1.PNG

 
Or  you can still put Air Expense in Line value, and drag the above measures to Tooltips of Line and clustered column chart.
2.PNG

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 REPLIES 5
Super User
Super User

Re: Line and clustered column chart: how to show more data points

You can use GROUPBY operation in the Query Editor.

 

GROUP BY - Airlines and Cabin type

 

Operation - COUNT for ticket count

 

 

Or You can simply drag and drop the ticket count in the values field and Airline and Ticket Type to put in the Rows and Columns of the Matrix Visual to see the desired result.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
dkay84_PowerBI New Contributor
New Contributor

Re: Line and clustered column chart: how to show more data points

Is there an option to "do not summarize" the field you used for the line?
kcyiu Frequent Visitor
Frequent Visitor

Re: Line and clustered column chart: how to show more data points

Thanks, the dataset is already result of GROUP BY.

 

Pulling ticket count to Line Value field only gives the sum of tickets bought for that cabin.

 

Capture.JPG

kcyiu Frequent Visitor
Frequent Visitor

Re: Line and clustered column chart: how to show more data points

Didn't see that, where do I look for it?

Moderator v-yuezhe-msft
Moderator

Re: Line and clustered column chart: how to show more data points

Hi @kcyiu,

If you want to show number of tickets bought for each cabin from each airline using Line in Line and clustered column chart, you would need  to create the following measures  and drag these measures to Line value section.

AA tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="AA"))
AC tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="AC"))
HU tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="HU"))
UA tickets = CALCULATE(SUM(Table1[Air Tickets]),FILTER(Table1,Table1[Airline code]="UA"))

1.PNG

 
Or  you can still put Air Expense in Line value, and drag the above measures to Tooltips of Line and clustered column chart.
2.PNG

Thanks,
Lydia Zhang

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