Forum Discussion
DAX FUNCTION FILTER
HI,
i m having a table with below values, I need a count the equip id row 's using filter Return_status ='NO' & REMARK1='DELIVERY' & result value need - with consent value 100
Please can u help
| EQUIP_ID | EQUIP_TYPE | RETURN_STATUS | REMARK1 |
| L 10573 | Van | NO | DELIVERY |
| m 67692 | Van | NO | DELIVERY |
| k 77921 | Van | NO | DELIVERY |
| l 90507 | Van | YES | DELIVERY |
| f 88162 | Truck | NO | LOADING |
| k 69179 | Van | NO | DELIVERY |
| d 22581 | Truck | YES | LOADING |
| p 21886 | Van | NO | DELIVERY |
- Anonymous9 years ago
You were sooo close. All you need to do is make use of the OR function. So the code would read:
Available = CALCULATE( COUNTA(EquipLive[EQUIP_ID]), OR( 'EquipLive'[REMARK1]="DELIVERY", 'EquipLive'[REMARK1]="LOADING" ), 'EquipLive'[RETURN_STATUS]="NO" )
6 Replies
- AnonymousNot applicable
Here is what i'd write. This is off the top of my head so you might need to put it into your Power BI and get it to check for errors:
Equip Count = Calculate( counta('TableName'[EQUIP_ID}), 'TableName'[RETURN_STATUS] = "NO", 'TableName'[REMARK1] = "DELIVERY" )Where 'TableName' is the name of the table that you are using
EDIT: I should note this is intended as a measure.- mifrasmmHelper I
Hi Ross,
Thanks for replying , its working
if i want include "LOADING " as well, I tried
Available = CALCULATE(COUNTA(EquipLive[EQUIP_ID]),'EquipLive'[REMARK1]="DELIVERY",'EquipLive'[REMARK1]="LOADING", 'EquipLive'[RETURN_STATUS]="NO")
Giving no result , Please help
- AnonymousNot applicable
You were sooo close. All you need to do is make use of the OR function. So the code would read:
Available = CALCULATE( COUNTA(EquipLive[EQUIP_ID]), OR( 'EquipLive'[REMARK1]="DELIVERY", 'EquipLive'[REMARK1]="LOADING" ), 'EquipLive'[RETURN_STATUS]="NO" )