Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello!
I need help with the correct Count DAX formula ont this.I have this table (Time entry) I need to have the following:
1 Time-Off TYpe Column: This is a conditional formula if the Type is Vacation, Status is Approve and if Description is Sick Leave then Time-Off Type is Sick Leave else is Casual.
2. I have to get the count the number of rows with Casual and number of rows with Sick Leave.
Thank you,
Juhoney
Solved! Go to Solution.
Hello
To get the total for casual and SL, open a matrice put the column To Type in it and the measur I gave you. it will give you the total
Hi, @juhoneyighot
Pls have you solved this problem now? you can refer to @JamesFR06 reply, thanks for your positive reply. If it doesn't solve the problem, you can refer to my method below.
Time Off Type =
IF(
'Table'[Description] = BLANK()
||'Table'[Type] = BLANK()
||'Table'[Status] = BLANK(),
BLANK(),
IF(
'Table'[Type] = "Vacation"
&& 'Table'[Description] = "Sick Leave"
&& 'Table'[Status] = "Approve",
"Sick Leave",
"Casual"
)
)
count of Casual =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Time Off Type] = "Casual" )
)
count of Sick Leave =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Time Off Type] = "Sick Leave" )
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @juhoneyighot
Pls have you solved this problem now? you can refer to @JamesFR06 reply, thanks for your positive reply. If it doesn't solve the problem, you can refer to my method below.
Time Off Type =
IF(
'Table'[Description] = BLANK()
||'Table'[Type] = BLANK()
||'Table'[Status] = BLANK(),
BLANK(),
IF(
'Table'[Type] = "Vacation"
&& 'Table'[Description] = "Sick Leave"
&& 'Table'[Status] = "Approve",
"Sick Leave",
"Casual"
)
)
count of Casual =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Time Off Type] = "Casual" )
)
count of Sick Leave =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Time Off Type] = "Sick Leave" )
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hello
To get the total for casual and SL, open a matrice put the column To Type in it and the measur I gave you. it will give you the total
Oh I'm sorry.
My apology, Only thos Vaction with approved status will have an Sick Leave and Casual in time Off Type
I hope you will help me ont his. My biggest apology.
Thank you,
Juhoney
TO Type = IF(AND(msdyn_timeentry[Type]="Vacation", and(msdyn_timeentry[Entry Status]="Approve", msdyn_timeentry[Description]="Sick Leave")),"Sick Leave",
IF(AND(msdyn_timeentry[Type]="Vacation", and(msdyn_timeentry[Entry Status]="Approve","Casual"))
Hi
If(and([type]="Vacation",and([Status]="Approve,[Description]="Sick Leave")),"Sick Leave", "Casual)
to get the count =countrows(filter([Table],[Time Off Type]="Sick Leave")
Hello!
Ive tried the formula but it wont filter
here is the formula that ive entered:
TO Type = IF(AND(msdyn_timeentry[Type]="Vacation", and(msdyn_timeentry[Entry Status]="Approve", msdyn_timeentry[Description]="Sick Leave")),"Sick Leave","Casual")
juhoney
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 57 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 108 | |
| 39 | |
| 33 | |
| 26 |