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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
HenryJS
Post Prodigy
Post Prodigy

Calculated Columns: DAX Code

Hi all,

 

Please could someone advise the DAX code for the below required calculated columns:

 

Column 1:

  • Consultant (simple - drag UserName to Rows)

 

Column 2: DAX Required

  • Open Jobs = Count of JobRef where JobStatus = Open

 

Column 3: DAX Required

  • Advertised Open Jobs = Count of JobRef where HasAdvert = Yes

 

Column 4: DAX Required

  • % Jobs Advertised = Column 2 / Column 3 * 100

 

Columns 2-4 need to relate to that consultant.

 

 

 Marketing Report.PNG

 

Thanks,

 

Henry

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@HenryJS ,

 

Could you please share more details about "Columns 2-4 need to relate to that consultant."?

 

Regards,

Jimmy Tao

az38
Community Champion
Community Champion

Hi @HenryJS 

try

Open Jobs = CALCULATE(COUNTROWS('Table'), ALLEXCEPT('Table','Table'[UserName]), 'Table'[JobStatus]="open")

Advertised Open Jobs =  CALCULATE(COUNTROWS('Table'), ALLEXCEPT('Table','Table'[UserName]), 'Table'[HasAdvert]="yes")

% Jobs Advertised = [Open Jobs]/[Advertised Open Jobs]

 

then for column % Jobs Advertised set data type as percent in Modeling ribbon

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38 

 

Instead of Count Rows, how do I make it output a '1' if the expressions we input are true?

 

Thanks,

 

Henry

az38
Community Champion
Community Champion

@HenryJS 

try

Open Jobs = CALCULATE(COUNTX('Table'[JobRef]), ALLEXCEPT('Table','Table'[UserName]), 'Table'[JobStatus]="open")

do not hesitate to give a kudo to useful posts and mark solutions as solution

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.