Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
manojk_pbi
Helper IV
Helper IV

Need help in writing DAX Measure

Hi Friends,

 

I have below data, using it i need to show what's the percentage of published task out of total tasks. Pls advice how can we do this both in KPI chart and in table.

% of Published Tasks = Tasks with publish status / all tasks excluding Delete & withdrwl

 

Col1Col2
Task1Publish
Task2Draft
Task3WIP
Task4Deleted
Task5Deleted
Task6Withdrwl
Task7Publish
Task8Publish
Task9Publish
Task10Draft
Task11New
Task12New
1 ACCEPTED SOLUTION
v-sdhruv
Community Support
Community Support

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.

View solution in original post

3 REPLIES 3
v-sdhruv
Community Support
Community Support

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!

v-sdhruv
Community Support
Community Support

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)

 

TitlePdatePstatusReviewDt
Titl15/28/2025Published7/23/2025
Titl25/28/2025Published4/23/2025
Titl35/28/2025Published7/23/2025
Titl45/28/2025Published7/23/2025
Titl55/28/2025Draft7/23/2025
Titl65/28/2025Deleted7/23/2025
Titl7 Draft7/23/2025
Titl85/28/2025Withdrawn7/23/2025

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.