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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ecs70206
Regular Visitor

dax help with division

hi community

 

 

I need to ask for your help, i have to find out what the spend per passenger is o  my most recent project. I know i need a new calculated column but i dont know how to make the dax work...i am trying to learn but DAX is really HARD 🙂

 

At the moment this is my situation. Ive brought three tables in and created a reference key for the routes. the table in the chart on

the report canvas as shown in the picture shows the spend and the number of passengers on each route alongside the route number. i need to create a column that divides the spend by route by the passenger number to find the spend by passenger by route but i dont know how

 

on my second table i have a column called code. this is linked to the route key on a many to many relationship. each route can take passengers that have different codes I also need to find out the cost per pupil by code.

 

i know this is alot ..but im bamboozled ... i've put as many pictures as i can in to show my situation , any help would be amazing

 

division.pngrelationship.jpgsheet.png

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

What you likely want are measures, not calculated columns. So, in the first example, you could create a measure like:

 

SpendPerPassenger = SUM([Spend]) / SUM([Passengers])

If you put this measure into your visual, it will be evaluated in context, which means within the context of each row. 

 

For the rest of it, sample data would help but this should get you started down the right path.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

thank you ,

 

I'll give that a go and let you know 

Hi @ecs70206,

 

Could you please tell me if your problem was resolved? Could you please share the answer or mark the proper answer as solution if it's convenient for you? That will be a help to the others.

Best Regards!
Dale

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors