cancel
Showing results for
Did you mean:
Regular Visitor

## DAX : Percentage of a category per day

I've been trying for 3 days to find a way to add a calculated column that display the percentage of "closed" state per day.

As you can see I have a "State" column , in it we can find "closed", "active","new"...etc
And a Date column , there can be multiple items per day

What I want is a calculated column that display the percentage of closed state (compared to total : closed,active,new...) per day. I can't find a way to do it, some help would be appreciated

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III

## Re: DAX : Percentage of a category per day

There are five identical rows in what you show. How is that to be taken into account? Try this calculated column:

```NewCol =
DIVIDE (
CALCULATE (
COUNT ( Table1[State] ),
Table1[State] = "Closed",
ALLEXCEPT ( Table1, Table1[Date] )
),
CALCULATE ( COUNT ( Table1[State] ), ALLEXCEPT ( Table1, Table1[Date] ) )
)
```

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers

2 REPLIES 2
Highlighted
Super User III

## Re: DAX : Percentage of a category per day

There are five identical rows in what you show. How is that to be taken into account? Try this calculated column:

```NewCol =
DIVIDE (
CALCULATE (
COUNT ( Table1[State] ),
Table1[State] = "Closed",
ALLEXCEPT ( Table1, Table1[Date] )
),
CALCULATE ( COUNT ( Table1[State] ), ALLEXCEPT ( Table1, Table1[Date] ) )
)
```

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers

Regular Visitor

## Re: DAX : Percentage of a category per day

Sorry, this lines are not the same, my screenshot is just not wide enough, there is item ID's.
Each day we have the state of every item , and their state change with time

I've tried you formula, adapted it and it finally works, thank you so much !

Announcements

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!