Forum Discussion
DAX Count Formula for a Specified Row
- 2 years ago
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
- Anonymous2 years ago
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 TeamIf 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
- JamesFR062 years agoResolver IV
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"))