Forum Discussion
DAX Function for COUNTIF and/or CALCULATE
- 10 years ago
Hi ksobota,
Based on your scenario, you can use the DAX below on your INDIVIDUAL table.
CountUser = CALCULATE(COUNTA(EMPLOYMENTS[Member_C]),FILTER(ALL(EMPLOYMENTS),EMPLOYMENTS[Member_C]=INDIVIDUAL[User_ID]))
Regards,
Charlie Liao
Jahspi,
It depends on what you are trying to do exactly.
There is a DAX command for CountBlank(ColumnName) and then to apply a filter you need to add a Calcualte in front.
Something like this Calculate(CountBlank(Column_with_Blanks),Filter(Table_ID,Table_ID[Primary_Key]=Table_Blank[Blank_ID]))
There are other ways to do this as well; but the primary thing to remember is that if you want to filter or get a subset I have found to always put a Calcualte in front.
Regards,
EILOOP
Hi,
Thanks for you reply. However, the formula since to give me incoherent number.
CALCULATE(COUNTBLANK('public ticket_event_data'[area_from_id]);FILTER('public ticket_event_data';'public ticket_event_data'[permission_id]='public magic_people'[permission_id]))Is there something wrong in this ?
THanks for your help !
Good Weekend.