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
TeisL
Frequent Visitor

Count different values in different columns, based on an equal date.

Hi,

 

To give you some background information:
I'm trying to report the number of Job Requisitions (Job Req ID) who where published (job post name) internally (Job Posting: Internal posting) and externally (Job Posting: External Posting) on the same date (Posting Start Date).


Example:

TeisL_2-1667480433072.png

 

In this example following job req id's should be counted:

  • 104588 = 1 double posting
  • 94584 = 1 double posting
  • 119917 = 0 double posting
  • 31630 = 0 double posting
  • 64128 = 0 double posting

 

Looking forward to your help!

Teis

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

In M code, you can try this

NewStep=Table.Group(PreivousStepName,"Job Req ID",{"Double Posting Count",each List.NonNullCount(Table.Group(_,"Posting Start Date",{"n",each if List.ContainsAll([Job Post Name],{"Internal",External"},(x,y)=>Text.Contains(x,y)) then 1 else null})[n])})

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

In M code, you can try this

NewStep=Table.Group(PreivousStepName,"Job Req ID",{"Double Posting Count",each List.NonNullCount(Table.Group(_,"Posting Start Date",{"n",each if List.ContainsAll([Job Post Name],{"Internal",External"},(x,y)=>Text.Contains(x,y)) then 1 else null})[n])})

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.

Top Solution Authors