Forum Discussion
True or False Percent Gauge
- Anonymous9 years ago
Create 3 Measures. First measure would be a simple "CountRows" measure. That will give you the total number of cases. This measure will change depending on your filter context. Next create a 2nd measure which is going to count the number of True rows, this can be done doing something like:
CountTrue = CALCULATE( COUNTROWS('YourTable'), 'YourTable'[Case Solved?] = TRUE() )Lastly the 3rd measure is what is your percentage, which will be the [CountTrue] / [CountAll]
Something like:
CountTrue = CALCULATE(
COUNTROWS('YourTable'),
'YourTable'[Completed] = TRUE(),
'YourTable'[DeliveredDate] <= 'YourTable'[TargetDate]
)Thank you Ross, I tried this and I received an error message:
CountTrue = CALCULATE(
COUNTROWS('My Table'),
'My table'[Total days delay design] = TRUE(),
'My table'[Design closing date] <= 'My table[Design requestdate]
The expression contains multiple columns, but only a single colomn can be used in a True/False expression that is used as a table filter expression.
In the column "Total days delay design" sometimes I have a number of days and sometimes nothing. Can you tell me what is wrong, please.
Thanks in advance :-)
- Anonymous9 years agoNot applicable
Looks like i've stuffed up and given you a bum steer. Ok lets go another direction. Create a new custom column with the formula:
CountMe = IF( 'My table'[Design closing date] <= 'My table[Design requestdate], 1, 0 )
Then use it within:
CountTrue = CALCULATE( COUNTROWS('My Table'), 'My table'[Total days delay design] = TRUE(), 'My table'[CountMe] = 1 )