Forum Discussion

peaky's avatar
peaky
Frequent Visitor
4 years ago
Solved

Measure working with multiple slicer selection

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.

EntityCountryLive Births per month

A

Germany

10000

BGermany10000
CPoland8000
DSpain13000
ESpain13000
FPortugal11000
GItaly5000
HHungary4500
IRomania6000
 
Is there a way to define in measure something to for example divide by 2 live births from one-country-entities when they are selected and leave alone the rest?

 

  •  

    Live Births = 
    SUMX(
        SUMMARIZE(
            Births,
            Births[Country],
            Births[LiveBirthsPerMonth]
        ),
        Births[LiveBirthsPerMonth]
    )

     

     

2 Replies

  • daXtreme's avatar
    daXtreme
    Icon for Solution Sage rankSolution Sage

     

    Live Births = 
    SUMX(
        SUMMARIZE(
            Births,
            Births[Country],
            Births[LiveBirthsPerMonth]
        ),
        Births[LiveBirthsPerMonth]
    )

     

     

  • peaky's avatar
    peaky
    Frequent Visitor

    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!