Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have the above table I've constructed. I'm pulling some measures into calculate columns, which is kinda weird, but please disregard that fact.
I've highlighted the 3 relevant columns.
[Median Regular] calculates the median of the [2018 Card Count %] column. However, what I'd like to do, is calculate the median of the [2018 Card Count %] column, for each [2018_PmtCount_Bracket].
So say .69 is the median for the entire table. But, what's the median for just those in the 100-10k bracket? Those in the <100 bracet? And so on. I keep getting stuck on the MEDIAN function only accepting a column for its first argument:
Solved! Go to Solution.
Gotcha, that's what I'd figured, though that still returned the median of the entire column, but...that was an excellent push in the right direction. This equation works:
Median per Bracket = CALCULATE(medianx(Orgs,[2018 Elec Count %]),filter(Orgs,Orgs[2018_PmtCount_Bracket] = earlier(Orgs[2018_PmtCount_Bracket])))
Median per Bracket = calculate( median(Orgs[Median 2018 Card Count %]]),
FILTER(Orgs, Orgs[2018_PmtCount_Bracket] = Orgs[2018_PmtCount_Bracket]))
This is a measure. I copy and pasted your column names so give it a test.
*edited*
Thanks. What does Table1 refer to in this?
Good question. That's what happens from bad copy and pasting! I'll edit it now.
Obviously you can check it on your own system.
Gotcha, that's what I'd figured, though that still returned the median of the entire column, but...that was an excellent push in the right direction. This equation works:
Median per Bracket = CALCULATE(medianx(Orgs,[2018 Elec Count %]),filter(Orgs,Orgs[2018_PmtCount_Bracket] = earlier(Orgs[2018_PmtCount_Bracket])))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |