Forum Discussion
Total Projects for Fiscal
- Anonymous2 years ago
Hi Jhadur ,
It looks like there is an error in your DAX code that is preventing the data from being loaded. The error message states that the text value “BNSPRJOP230245” could not be converted to a True/False type. This is usually because the text value is used in a logical expression.
So I think you can just calculate the value returned by _Table. Here is my modified DAX code:
TOTAL PROJECTS FOR FY = VAR __MinDate = DATE ( 2023, 11, 01 ) VAR __MaxDate = DATE ( 2024, 10, 31 ) VAR __Table = FILTER ( 'Projects', [Start] >= __MinDate && 'Projects'[Start] <= __MaxDate ) RETURN COUNTROWS ( __Table )Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jhadur ,
It looks like there is an error in your DAX code that is preventing the data from being loaded. The error message states that the text value “BNSPRJOP230245” could not be converted to a True/False type. This is usually because the text value is used in a logical expression.
So I think you can just calculate the value returned by _Table. Here is my modified DAX code:
TOTAL PROJECTS FOR FY =
VAR __MinDate =
DATE ( 2023, 11, 01 )
VAR __MaxDate =
DATE ( 2024, 10, 31 )
VAR __Table =
FILTER ( 'Projects', [Start] >= __MinDate && 'Projects'[Start] <= __MaxDate )
RETURN
COUNTROWS ( __Table )
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
I need to make a couple changes to the way this measure is calculated. I need to count the unique project codes with a Forecast Delivery Date "after today". This should give an accurate count of current active projects, as many of our projects span multiple fiscal years. The table has a line for each month a project update report was submitted, so each project has multiple lines and I need a count of the unique project codes. I appreciate your assistance.
| Project Code | OP | Project Name | Start | Finish | Forecast Delivery Date | Sponsor | Report Status | Status Report Date |
| PRJ01 | OP01 | OP01 project 1 | 2022-03-01 | 2024-10-31 | 2024-10-31 | VP Name | Final | 2024-01-23 |
| PRJ01 | OP01 | OP01 project 1 | 2022-03-01 | 2024-12-06 | 2024-12-06 | VP Name | Final | 2024-02-20 |
| PRJ01 | OP01 | OP01 project 1 | 2022-03-01 | 2025-07-09 | 2025-07-09 | VP Name | Final | 2024-03-19 |
| PRJ01 | OP01 | OP01 project 1 | 2022-03-01 | 2025-07-09 | 2025-07-09 | VP Name | Final | 2024-04-15 |
| PRJ02 | OP02 | OP02 project 2 | 2024-05-01 | 2024-12-06 | 2024-12-06 | VP Name | Final | 2024-01-23 |
| PRJ02 | OP02 | OP02 project 2 | 2024-05-01 | 2024-12-06 | 2024-12-06 | VP Name | Final | 2024-02-20 |
| PRJ02 | OP02 | OP02 project 2 | 2024-05-01 | 2024-12-06 | 2024-12-06 | VP Name | Final | 2024-03-19 |
| PRJ02 | OP02 | OP02 project 2 | 2024-05-01 | 2024-12-06 | 2024-12-06 | VP Name | Final | 2024-04-15 |