Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
I'm struggling for some time with data selection. It's best to describe situation.
I've got data like this below. I've entities that are from different countries and on visualization I need to show live births per country not entity. It means that when I have on slicer selected entity A it should show me 10000 births, also when I will select entity A and B it should show me 10000 births, but every solution that I've got shows me 20000 births while they are selected. The same situation is with multiple selection of entities A, B, C, D, E and it should show me 31000 of live births but instead of that I have 54000.
Entity | Country | Live Births per month |
A | Germany | 10000 |
B | Germany | 10000 |
C | Poland | 8000 |
D | Spain | 13000 |
E | Spain | 13000 |
F | Portugal | 11000 |
G | Italy | 5000 |
H | Hungary | 4500 |
I | Romania | 6000 |
Solved! Go to Solution.
Live Births =
SUMX(
SUMMARIZE(
Births,
Births[Country],
Births[LiveBirthsPerMonth]
),
Births[LiveBirthsPerMonth]
)
Man.. that's lifechanger! I didn't know that I need to make virtual table that is grouped by.
Hint for anybody else having similar issue - if you have to filter by year and month or other dimensions, just add collumns that are described by them in SUMMARIZE() function, then it should work great!
Live Births =
SUMX(
SUMMARIZE(
Births,
Births[Country],
Births[LiveBirthsPerMonth]
),
Births[LiveBirthsPerMonth]
)
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |