cancel
Showing results for
Did you mean:
Highlighted
Member

## Show the proportion of 0s against the total per day on a visual

Hi,

Story: I have a 0s and 1s for each day. I would like to visually show the proportion of 0s to the total counts per day on a visual.

I created a matrix putting date on rows, the column in question in the "columns" and "values" box. Then I right clicked on the show value as Percent of row total which works perfectly. I need that matrix turned into a visual keeping only the 0s  proportion.

Objective: How can I make a visual that will show case the 0s in % row total exactly as the matrix above. Do I have to create measures for this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

## Re: Show the proportion of 0s against the total per day on a visual

You would yes.  Something list this will get you what you are looking for.

```0 pct of total =
VAR _zeros =
CALCULATE(
COUNTROWS( 'YourTable' ),
'YourTable'[Value] = 0
)
VAR _Total =
COUNTROWS( 'YourTable' )
RETURN
DIVIDE ( _zeros, _Total )```

Then you put that measure in your chart values along with the date on the axis.

2 REPLIES 2
Super User

## Re: Show the proportion of 0s against the total per day on a visual

You would yes.  Something list this will get you what you are looking for.

```0 pct of total =
VAR _zeros =
CALCULATE(
COUNTROWS( 'YourTable' ),
'YourTable'[Value] = 0
)
VAR _Total =
COUNTROWS( 'YourTable' )
RETURN
DIVIDE ( _zeros, _Total )```

Then you put that measure in your chart values along with the date on the axis.

Member

## Re: Show the proportion of 0s against the total per day on a visual

Such a quick and elegant solution, thank you

Announcements

Kudos to you if you earned one of these! Check your inbox for a notification.

#### Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

#### Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (3,581)