Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Jbridgewater
Regular Visitor

Calculate the count of measure results and show results in designated columns

So I need to calculate the count of a measure.  I have calculated the number of vacancies as: 

Vacancy = CALCULATE('Capacity Census'[Total Capacity] - 'Capacity Census'[Total Census])
 
I need to show a count of Vacancy by numeric categories.
 
Below is the example in a mock up from Excel.  Using the Total capacity bucket of 2 and the # of Vacancies of 2 the matrix shows a count of 34 in the # of vacancies 1 "bucket" and a count of 6 in the # of vacancies 2  bucket.  This means that there are 34 instances of 1 vacancy and 6 instances of 2 vacancies for a total of 46 vacancies.
I have created the Total capacity buckets in a seperate table and linked the tables via the alias number.  I think I need the # Vacancies to also be "bucketed" but as a count.
 # Vacancies 
Total Capacity12345678Grand Total
15       5
2346      40

3

188235     216

Below are the tables I am using: first is the census/capacity table. Second is the Capacity Buckets table

Long AliasDateActual/ForecastCensusAliasCapacity
059204 MO-Mntr-4407 Sussex Dr-ISL_WGH12/1/2024Actual 592041
059204 MO-Mntr-4407 Sussex Dr-ISL_WGH12/1/2024Actual159204 
059207 - MO-Mntr-1704 Affirmed Blvd -ISL12/1/2024Actual 592072
059207 - MO-Mntr-1704 Affirmed Blvd -ISL12/1/2024Actual259207 
059208_5465 Geyser Blvd_WGH12/1/2024Actual 592083
059208_5465 Geyser Blvd_WGH12/1/2024Actual259208 
059210_3516 Valencia Dr_WGH12/1/2024Actual 592102
059210_3516 Valencia Dr_WGH12/1/2024Actual259210 
059212_1621 Hanover Blvd_WGH12/1/2024Actual 592122
059212_1621 Hanover Blvd_WGH12/1/2024Actual259212 

Alias

Long AliasDateCapacity Bucket
059204059204 MO-Mntr-4407 Sussex Dr-ISL_WGH12/1/20241
059207059207 - MO-Mntr-1704 Affirmed Blvd -ISL12/1/20242
059208059208_5465 Geyser Blvd_WGH12/1/20243
059210059210_3516 Valencia Dr_WGH12/1/20242
059212059212_1621 Hanover Blvd_WGH12/1/20242
059213059213 MO-Mntr-3709 Rollins Rd-ISL_WGH12/1/20242

Here are the table connections

Jbridgewater_0-1738352400249.png

I hope this is clear.  Thanks for any assistance.

John

4 REPLIES 4
v-kongfanf-msft
Community Support
Community Support

Hi @Jbridgewater ,

 

Did @danextian  reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

 

Best regards,

Adamk Kong

Jbridgewater
Regular Visitor

Thanks to both.  I will need to digest this a bit.

John

danextian
Super User
Super User

Hi @Jbridgewater 

 

As @lbendlin, you cannot bucketized measures. They dont have filter context and they need to be materialized first.  I've attached several sample pbix files that does this.

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
lbendlin
Super User
Super User

Power BI does not support dynamic bucketing. You need to bring your own bucket list (apologies for the pun).

 

You cannot measure a measure directly. Materialize it first.

 

Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.