Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi everyone,
I'll try to be as clear as possible:
I'm working on some data in which each observation is a single transaction ID (about 30000 observations). There's variables for location (province theres about 100 of them) and for type of event. I have a separate table in my model that corresponds population to each province.
What I want to do is to add a new column to the main table (the one that contains every single observation) that populates based on population for the respective province.
Is my only solution to write a neverending ifelse function in DAX that does this or is there a more elegant and simple solution?
Edit:
I'm including a sample data set with randomized values, as suggested by @ams1 (thanks!):
Table with transaction ID and geographical info
| ID | jurisdiction | province |
| 546541 | Local | Province1 |
| 4513215 | Local | Province2 |
| 2418574 | Local | Province2 |
| 121357 | Local | Province3 |
| 248576 | Local | Province5 |
| 454612 | Local | Province1 |
| 374884 | Local | Province2 |
| 84668 | Local | Province3 |
| 468541 | Local | Province4 |
| 6848634 | Local | Province2 |
| 88465 | Local | Province5 |
| 68484 | Local | Province1 |
| 4 | Local | Province2 |
| 55684 | Local | Province3 |
| 46514 | Local | Province5 |
| 36464 | Local | Province3 |
Reference table with population per province:
| province | population |
| Province1 | 98650 |
| Province2 | 153465 |
| Province3 | 175462 |
| Province4 | 356489 |
| Province5 | 20560 |
Thanks in advance!
Solved! Go to Solution.
Hi @phhb ,
Please provide sample data for the tables, otherwise there is a HIGH probability you will NOT get an answer. 🙂
So, with a fresh cup of coffee in a new morning I realized I am a noob and should have just used the Merge query button. i'm closing the topic -.-
Hi @phhb ,
Please provide sample data for the tables, otherwise there is a HIGH probability you will NOT get an answer. 🙂
Thanks for the warning, I've included it in the original post
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 6 | |
| 5 |