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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Community Champion
Community Champion

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
Community Champion
Community Champion

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

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.