Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I created a measure called MaxBirths, that would show the highest level of Births for all countries in a matrix. If I select any month on my slicer, the matrix looks perfectly fine:
However, if I select multiple months, or all months in a year, it sums them all up like this:
If I select 'All months', and the highest births in ASIA were witnessed, for example, in China in May - then that's the number I would like to be displayed for both China and ASIA rows, not the sum.
Any ideas how I could accomplish that?
My current formula:
Will appreciate any advice, have spent hours on this!
Solved! Go to Solution.
@Anonymous , Try like
MaxBirths = MAXX (Summarize('Table', 'Table'[Country], 'Table[Month] ), CALCULATE ( COUNT ( 'Table'[Births] ) ) )
DEFINE
MEASURE Births[#Births] =
SUM( Births[Births] )
MEASURE Births[Max #Births] =
CALCULATE(
MAXX(
SUMMARIZE(
Births,
Births[Country],
Births[Period]
),
Births[#Births]
),
ALLSELECTED( Births[Period] )
)
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
10 | |
8 |