cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rohit_dutta
Frequent Visitor

counting measure

I have calculated 4 measure from my table as below

 

Scheduled_Effort = Var SE = calculate(sum('Resource Utilization Query'[scheduled_effort]), filter('Resource Utilization Query', 'Resource Utilization Query'[period_start] > today()))
return
if(isblank(SE), 0 , SE)
Remaining_Capacity = CALCULATE(sum(Capacity_Measure[capacity]), filter(Time_Dimension, Time_Dimension[period_start] > today()))
Scheduled_Utilization = [Scheduled_Effort] / [Remaining_Capacity]
 Utilization_Category = if('Resource Utilization Query'[Overall_Utilization] < 1, "Underutilized", if('Resource Utilization Query'[Overall_Utilization] = 1, "Proper Allocated", "Overal Load"))
 
now I want to count all the people falls under utilization_category, like below table
 
Utilization_CategoryCount
Underutilized5
Over Load10
Proper Allocated15

 

I have tried many combination in switch masure but it did not work. one example below:-

 

Switch_measure_category =
var selected = SELECTEDVALUE(Category[Category])
var SU = DIVIDE([Scheduled_Effort], Capacity_Measure[Remaining_Capacity])
 
return
SWITCH(True(),
selected = "Over Load", CALCULATE(DISTINCTCOUNT('Resource Utilization Query'[Resource_Name]), filter(Capacity_Measure, Not ISBLANK(Capacity_Measure[Remaining_Capacity])), filter('Resource Utilization Query', SU >1)),
selected = "Underutilized", CALCULATE(DISTINCTCOUNT('Resource Utilization Query'[Resource_Name]), filter(Capacity_Measure, Not ISBLANK(Capacity_Measure[Remaining_Capacity])), filter('Resource Utilization Query', SU <1)),
selected = "Proper Allocated", CALCULATE(DISTINCTCOUNT('Resource Utilization Query'[Resource_Name]), filter(Capacity_Measure, Not ISBLANK(Capacity_Measure[Remaining_Capacity])), filter('Resource Utilization Query', SU =1)))
 
3 REPLIES 3
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Please find below the pbix file, I want to show count of Category (measure) by Category

Link to power bi file 

 

see attached. I removed all your measures and extra tables that were not required for the solution.

Helpful resources

Announcements
Winner of T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Find out who won the T-Shirt Design Challenge and the top 3 finalists.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.