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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
twowaysyellow
Frequent Visitor

How to set up a model to count trips starting and/or ending in the same municipality?

I have a challenging model for what you can compare to bus trips. I want to be able to count how many trips start in a municipality, how many trips end in a municipality and how many start and end in a municipality and region. Ideally, I would like this to be in the form of a drop-down, so when I select a municipality in a drop-down, I will get the number of trips that start and/or end in that municipality; all trips that only start + all the only ends + all that starts and ends.

 

 muni1muni2muni3muni4
start1200
end2100
total3300

 

I have a model like the one below and pbix file can be downloaded here: https://we.tl/t-ZKpZxRRfsf (I thought I could attach to the post, but I didn't find anywhere to do it). I'm pretty sure, that is where the problem lies, so I would like any tips on enhancing this. But even if that is fixed, then I'm also looking for inspiration to create a measure, that will allow me to create a drop-down as mentioned.

Screenshot 2023-09-04 at 13.36.37.png

 

Please let me know, if I can share any other relevant details.

1 REPLY 1
MFelix
Super User
Super User

Hi @twowaysyellow ,

 

From what I can see from the model you shared theres is no relationship between the municipality and the bus travels. How do you identify that a certain trip is for a certain municipality?

 

The only one that is identified is the permanent stop id 210 but that is for municipality 4.

 

Can you explain a little better how you get to the numbers you present on top?

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.