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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ghutchins
Helper II
Helper II

Conditionally Count Calculated Values in a Column

Greetings...  here is my problem of the week.  Spent 5 days and a lot of code and have came up empty.  Hope there is some help for me out there.  Having fun trying to figure it out but running into a deadline.

 

I would like to compare values in the a table and count them if they meet a certain criteria.  For each row in the table I would like to count how many times the monthly value is >= 10.  The column or measure that I am trying to develop would show all 'Values' in this calculated column to be '0' except for 'State' g,h, and i   Which would show 1,2,3 respectively.  

The calculation to get the monthly values is

Close Date (Difference) =  DATEDIFF (  'Table'[Startdate]'Table'[CloseDate]DAY )



StateSeptemberOctoberNovemberValue
a5 530
b2 220
c4 210
d3 320
e4 330
f7 420
g4 4121
h15 3142
i1112143
1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Try to add a new column with the code below?

Value =

IF([September]>=10,1)+

IF([October]>=10,1)+

IF([Novembee]>=10,1)

View solution in original post

2 REPLIES 2
ghutchins
Helper II
Helper II

I see where you are going.  I may not have detailed my setup enough, the month names are not data/calculated columns.  The month columns equal the heirachy 'Month' from the 'Start Date' column in the table.

Tried this approach but no cigar...  still in the deep end of the pool.

 
Column = IF(
  'Table'[Startdate].[Month]= "September" &&  AVERAGE('Table'[Closeddate] (Difference)]) >=10  ,1  +
IF(
  'Table'[Startdate].[Month]= "October" &&  AVERAGE('Table'[Closeddate] (Difference)]) >=10  ,1  +
IF(
  'Table'[Startdate].[Month]= "November" &&  AVERAGE('Table'[Closeddate] (Difference)]) >=10  ,1  
  )
 ))
FreemanZ
Super User
Super User

Try to add a new column with the code below?

Value =

IF([September]>=10,1)+

IF([October]>=10,1)+

IF([Novembee]>=10,1)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors