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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply

calculate number of projects by area using a group by

I have the following table and I want to calculate how many tasks based on project phase over plan, initiate and go live. These are 3 seperate measures which will calculate count, the number of tasks by market (UK, DE, AUS etc) in business area (Strategic, Consumer, etc).

 

However, I want each measure when market = all then add the value to each market (UK, DE,AUS, etc) as I have a visual that is calculating the number of complete over the markets and I cannot have ALL market into my table visual, as I need to compare which markets have completed the most.  

 

So when market equals all, add that value to each portfolio's value. For instance there are 2 tasks completed in the plan project stage for business strategic area  , however, there are 3 DE tasks in plan in the same area so I want it it to show there has been 5 completed for DE for plan just for strategic, etc.  

MarketBusiness Area ProjectsPhaseStatusActual DateExpected Date
AllAnalyticsTask1 PlanIn Progress01/01/202201/01/2022
AllAnalyticsTask2InitiateIn Progress02/01/202202/01/2022
AllAnalyticsTask3InitiateIn Progress03/01/202203/01/2022
AllAnalyticsTask4PlanIn Progress04/01/202204/01/2022
AllAnalyticsTask5PlanIn Progress05/01/202205/01/2022
AllAnalyticsTask6PlanIn Progress06/01/202206/01/2022
UKStrategicTask7InitiateNot Started07/01/202207/01/2022
UKStrategicTask8InitiateIn Progress08/01/202208/01/2022
UKStrategicTask9PlanIn Progress09/01/202209/01/2022
UKStrategicTask10Go LiveCompleted10/01/202210/01/2022
UKStrategicTask11Go LiveIn Progress11/01/202211/01/2022
UKStrategicTask12Go LiveIn Progress12/01/202212/01/2022
UKStrategicTask13InitiateCompleted13/01/202213/01/2022
DEStrategicTask14InitiateCompleted14/01/202214/01/2022
DEStrategicTask15PlanCompleted15/01/202215/01/2022
DEStrategicTask16Go LiveCompleted16/01/202216/01/2022
DEStrategicTask17Go LiveCompleted17/01/202217/01/2022
DEStrategicTask18InitiateCompleted18/01/202218/01/2022
DEStrategicTask19InitiateCompleted19/01/202219/01/2022
DEStrategicTask20InitiateCompleted20/01/202220/01/2022
DEStrategicTask21Go LiveIn Progress21/01/202221/01/2022
DEStrategicTask22Go LiveIn Progress22/01/202222/01/2022
AllTransformationTask23PlanCompleted23/01/202223/01/2022
AllTransformationTask24Go LiveCompleted24/01/202224/01/2022
AllTransformationTask25InitiateCompleted25/01/202225/01/2022
AllTransformationTask26InitiateCompleted26/01/202226/01/2022
AllTransformationTask27PlanCompleted27/01/202227/01/2022
AllTransformationTask28PlanCompleted28/01/202228/01/2022
AllTransformationTask29Go LiveIn Progress29/01/202229/01/2022
AllTransformationTask30Go LiveCompleted30/01/202230/01/2022
AllTransformationTask31InitiateCompleted31/01/202231/01/2022
USAStrategicTask32PlanCompleted01/02/202201/02/2022
USAStrategicTask33InitiateCompleted02/02/202202/02/2022
USAStrategicTask34InitiateCompleted03/02/202203/02/2022
USAStrategicTask35Go LiveCompleted04/02/202204/02/2022
USAStrategicTask36InitiateCompleted05/02/202205/02/2022
USAStrategicTask37Go LiveCompleted06/02/202206/02/2022
USAStrategicTask38Go LiveCompleted07/02/202207/02/2022
USAStrategicTask39InitiateNot Started08/02/202208/02/2022
USAStrategicTask40Go LiveCompleted09/02/202209/02/2022
AllPharmaTask41PlanCompleted10/02/202210/02/2022
AllPharmaTask42PlanCompleted11/02/202211/02/2022
AllPharmaTask43PlanCompleted12/02/202212/02/2022
AllPharmaTask44PlanCompleted13/02/202213/02/2022
AllPharmaTask45InitiateCompleted14/02/202214/02/2022
AUSStrategicTask46InitiateCompleted15/02/202215/02/2022
AUSStrategicTask47PlanCompleted16/02/202216/02/2022
AUSStrategicTask48InitiateCompleted17/02/202217/02/2022
AUSStrategicTask49Go LiveNot Started18/02/202218/02/2022
AUSStrategicTask50Go LiveNot Started19/02/202219/02/2022
AUSStrategicTask51Go LiveIn Progress20/02/202220/02/2022
AUSStrategicTask52Go LiveIn Progress21/02/202221/02/2022
AllStrategicTask53PlanCompleted22/02/202222/02/2022
AllStrategicTask54InitiateNot Started23/02/202223/02/2022
AllStrategicTask55Go LiveNot Started24/02/202224/02/2022
AllStrategicTask56InitiateCompleted25/02/202225/02/2022
AllStrategicTask57Go LiveCompleted26/02/202226/02/2022
AllConsumerTask58PlanCompleted27/02/202227/02/2022
AllConsumerTask59PlanCompleted28/02/202228/02/2022
AllConsumerTask60PlanCompleted01/03/202201/03/2022
AllConsumerTask61Go LiveCompleted02/03/202202/03/2022
AllConsumerTask62InitiateCompleted03/03/202203/03/2022
AllConsumerTask63PlanCompleted04/03/202204/03/2022
AllConsumerTask64InitiateCompleted05/03/202205/03/2022
AllConsumerTask65InitiateCompleted06/03/202206/03/2022
AllConsumerTask66InitiateCompleted07/03/202207/03/2022
AllStrategicTask67PlanCompleted08/03/202208/03/2022
AllStrategicTask68InitiateCompleted09/03/202209/03/2022
1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @knowledgesearch

 

You can try the following dax.

Create calculated table.

 

Table =
FILTER(
    'Table','Table'[Market]="All"&&'Table'[Status]="Completed")

 

Create measure.

Flag =
var _countgroup=
COUNTX(
    FILTER(ALL('Table'),'Table'[Market]=MAX('Table'[Market])&&
    'Table'[Business Area ]=MAX('Table'[Business Area ])&&
    'Table'[Phase]=MAX('Table'[Phase])&&'Table'[Status]=MAX('Table'[Status])),[Market])
var _counall=
COUNTX(
    FILTER(ALL('Table 2'),
    [Business Area ]=MAX('Table'[Business Area ])&&[Phase]=MAX('Table'[Phase])),[Market])
return
_counall+ _countgrou

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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