Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
Solved! Go to 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"))
Or you can still put Air Expense in Line value, and drag the above measures to Tooltips of Line and clustered column chart.
Thanks,
Lydia Zhang
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"))
Or you can still put Air Expense in Line value, and drag the above measures to Tooltips of Line and clustered column chart.
Thanks,
Lydia Zhang
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?
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, 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.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
117 | |
101 | |
71 | |
61 |