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! Request now

Reply
Anonymous
Not applicable

Need help finding a DAX formula to use for counting

I need to find a formula to help me count some deliveries and do not know what to use. So basically my logic needs to show 

if payment is >750 then 1, if payment is =0 then 0, if payment is <0 then -1, anything else would be 0.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

Assume that your payment column is already calculated.

You can create a measure using the following dax:

Measure = IF(SELECTEDVALUE('Table'[payment])>750,1,IF(SELECTEDVALUE('Table'[payment])<0,-1,0))

vjialongymsft_0-1716961673420.png

 

Or as @KMcCarthy9  says you can create a calculated column.

Column = IF('Table'[payment]>750,1,IF('Table'[payment]<0,-1,0))

vjialongymsft_1-1716961716448.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

 

Assume that your payment column is already calculated.

You can create a measure using the following dax:

Measure = IF(SELECTEDVALUE('Table'[payment])>750,1,IF(SELECTEDVALUE('Table'[payment])<0,-1,0))

vjialongymsft_0-1716961673420.png

 

Or as @KMcCarthy9  says you can create a calculated column.

Column = IF('Table'[payment]>750,1,IF('Table'[payment]<0,-1,0))

vjialongymsft_1-1716961716448.png

 

 

 

 

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

KMcCarthy9
Helper V
Helper V

You need a calculated column:
Payment = 
IF([payment] > 750, 1,
IF([payment] = 0, 0,
IF([payment] <0, -1,
0)))

Of course with this you will miss anything between 1 - 750....

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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!

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