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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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 carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.