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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
kcyiu
Regular 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

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.

View solution in original post

6 REPLIES 6

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

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

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.

Hi @v-yuezhe-msft ,

BTW, I have question need you help answer. Whether we can use calculation Item (on Calculation groups) replace measure when work line and clustered chart?

BhaveshPatel
Community Champion
Community Champion

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.

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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