Forum Discussion

manojk_pbi's avatar
manojk_pbi
Helper V
1 year ago
Solved

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 Ta...
  • v-sdhruv's avatar
    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.

  • v-sdhruv's avatar
    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!