Forum Discussion
ksobota
10 years agoRegular Visitor
DAX Function for COUNTIF and/or CALCULATE
Hello, I am fairly new to Power BI and am even newer to the use of DAX functions. For years I have worked in Excel and know how I would do this there, but am finding the same formula I would use ...
- 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
6 years agoRegular Visitor
Hi !
I'm a new to PowerBI and I can't find a proper formula to count number of occurance from a filtered value.
I have two tables :
Table A :
-PermissionID (PrimaryKey) with only distinct values
Table B:
-PermissionID (ForeignKey) with non disitinct values
-AreaFrom (blank or not)
I would like to add a calculate column in Table A to count the number of time the AreaFrom is blank for each PermissionID (Table A).
I tried something like that but with no sucess :
Occurence =
COUNTX(
'public ticket_event_data';
FILTER(
'public ticket_event_data';'public ticket_event_data'[area_from_id]=BLANK()
)
)
Do you have any suggestions ?
Thanks.