Forum Discussion
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.
- Anonymous2 years ago
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))Or as KMcCarthy9 says you can create a calculated column.
Column = IF('Table'[payment]>750,1,IF('Table'[payment]<0,-1,0))Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- KMcCarthy9
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.... - AnonymousNot 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))Or as KMcCarthy9 says you can create a calculated column.
Column = IF('Table'[payment]>750,1,IF('Table'[payment]<0,-1,0))Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.