0

I am trying to display on time performance as a percentage using a calculated column in PowerBI but when I filter the dates on my dashboard, all months or weeks outside of the filter display as 100% rather than disappearing like all other visuals on the dashboard. Even more strange is when using a line and clustered column chart, it works fine but does not work properly with a line chart.

This is my calculated column formula: Controllable On-Time = 1-(CALCULATE(COUNT('Order Data Query'[QC Code]),FILTER('QC Code Key','QC Code Key'[Controllable?] = "Controllable")) / COUNT('Order Data Query'[Job ID]))

When using a date filter, anything outside of the filter displays as 100% rather than disappearing like all other visuals

Albert
  • 3
  • 1

1 Answers1

0

Review your column formula:

Controllable On-Time = 1-(CALCULATE(COUNT('Order Data Query'[QC Code]),FILTER('QC Code Key','QC Code Key'[Controllable?] = "Controllable")) / COUNT('Order Data Query'[Job ID]))

we can simplify it as:

Controllable On-Time = 1 - X

therefore, when X = 0, then

Controllable On-Time = 1

hence, it is a constant value always equal to 1 (or 100% if formatted as percentage).

Seymour
  • 3,104
  • 2
  • 22
  • 46
  • I understand the math behind it. What I dont understand is why PowerBI visual displays 100% rather than disappearing like all other visuals do when the date is filtered. A typical interaction is to not display dates outside of the date filter given but this measure somehow still displays outside of the date filters applied to the page. – Albert Jun 08 '20 at 20:19
  • The explanation is in my answer. The measure is defined as a constant always equal to 1. Does this help to make the explanation more clear? – Seymour Jun 08 '20 at 20:55