Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I've created a formula to show me the total headcount found in the top three regions (CBSAs), which produces a value of 2.11M in my model.
The TOPN function returns a single (scalar and numerical) value (it's confusing, I know).
To do what you need you should use RANKX. If you need to return a scalar text value (a string of values/names) based on a filter on the rank value, you can subsequently use CONCATENATEX(FILTER....).
Happy to expand if you get stuck (but please provide either a PBIX file or a sample dataset)!
Proud to be a Super User!
Paul on Linkedin.
Sure, no problem...but it would be very helpful if you provided either a sample (non confidential) dataset or PBIX file itself. The way your model is set up is of paramount importance (it always is...)
otherwise we are just guessing when writing measures...
Proud to be a Super User!
Paul on Linkedin.
Ugh. Simple enough question. You don't need a sample to do it.
Here's the table that I'm using:
CBSA # Member Month Count
National 1052218
Los Angeles Metro Area 793053
Chicago Metro Area 269028
Greater Inland Empire Area 108374
Denver Metro Area 107896
Dallas Metro Area 69337
Philadelphia Metro Area 66654
Greater Phoenix Area 63122
Atlanta Metro Area 59860
So which is the column for members for the headcount?
Proud to be a Super User!
Paul on Linkedin.
# Member Month Count contains the values (essentially people who live in one of the CBSAs or regions).
For example, the CBSA "National" has 1,052,218 members living in that region.
Ok, thanks for that.
So... what you need is the top 3 based on the table you posted as an example? (Ie by location?) what is the table & column which defines the filter context for the location in the table you posted? is the headcount aggregation a measure? If so, what is the measure?
BTW, having "National" in your table. Does that mean you wish to include "National" in your top 3?
Proud to be a Super User!
Paul on Linkedin.
I've already created the measure to calculate the total members of the top 3 CBSAs. That is the formula I referenced above. What I need to do now is to create a string text that basically identifies those three CBSAS. For example,
Top 3 Text CBSAs = If(CBSA IN [Top 3 CBSA Members], [Top3 CBSA Names].
Therefore the [Top 3 CBSA Names] would show, "National", "Los Angeles Metro Area", "Chicago Metro Area"
Yes, I know. The problem is you need to establish the CBAS which are in the top 3. That's what I'm trying to help you with. We need to use RANKX.
To do so so we need to rank the CBAS (whatever they are) based on the filter context you need (by Total locations, by location...etc...). Once we have the rank, we can then list them in a measure with CONCATENANTEX
Proud to be a Super User!
Paul on Linkedin.
So, this formula shouldn't be used, correct?
I tried the formula below, but it doesn't work either:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |