Forum Discussion
Need help in writing DAX Measure
- 1 year ago
Hi manojk_pbi ,
You can try this measure:
% Published Tasks =
DIVIDE(
CALCULATE(COUNTROWS(Data), Data[Col2] = "Publish"),
CALCULATE(COUNTROWS(Data), NOT(Data[Col2] IN {"Deleted", "Withdrwl"}))
)
Hope this helps!
If the response has addressed your query, please accept it as a solution so other members can easily find it.
Thank you. - 1 year ago
Hi manojk_pbi ,
You can try this-
ValidPg% =
DIVIDE(
CALCULATE(
COUNTROWS(Data),
NOT(ISBLANK(Data[Pdate])),
Data[ReviewDt] <= TODAY()
),
CALCULATE(
COUNTROWS(Data),
NOT(ISBLANK(Data[Pdate])),
NOT(Data[Pstatus] IN {"Deleted", "Withdrawn"})
)
)
Hope this helps!
Hi manojk_pbi ,
You can try this measure:
% Published Tasks =
DIVIDE(
CALCULATE(COUNTROWS(Data), Data[Col2] = "Publish"),
CALCULATE(COUNTROWS(Data), NOT(Data[Col2] IN {"Deleted", "Withdrwl"}))
)
Hope this helps!
If the response has addressed your query, please accept it as a solution so other members can easily find it.
Thank you.
Hi v-sdhruv ,
thanks for the measure it worked.
Request you to guide me on this extended requirement on similar data.
Need to calculate % of valid page here.
ValidPg% = No Titles where Pdate not "" or null and ReviewDt less than or equal to Todays dt /
all titles where Pdate not "" or null and state not in (Deleted, withdrawn)
| Title | Pdate | Pstatus | ReviewDt |
| Titl1 | 5/28/2025 | Published | 7/23/2025 |
| Titl2 | 5/28/2025 | Published | 4/23/2025 |
| Titl3 | 5/28/2025 | Published | 7/23/2025 |
| Titl4 | 5/28/2025 | Published | 7/23/2025 |
| Titl5 | 5/28/2025 | Draft | 7/23/2025 |
| Titl6 | 5/28/2025 | Deleted | 7/23/2025 |
| Titl7 | Draft | 7/23/2025 | |
| Titl8 | 5/28/2025 | Withdrawn | 7/23/2025 |