Forum Discussion
Back2Basics
Resolver I
9 years agoPlot stock level of workload
Hi I have a table with 'Date received' and 'End Date' columns. An item is 'Active' when there is a date received but no end date. Once an end date has been entered it si no longer active. ...
Anonymous
9 years agoNot applicable
Instead of creating a calculated column, I would create a column in Query Editor; it will compress much better.
Go to Add Column in QE's ribbon, and Add Conditional Column
if [End Date] equals null then 0 else 1
Click OK.
the formula bar will now show this:
Table.AddColumn(<the step immediately before>, "Is Active", each if [End Date] = null then "0" else "1")
Remove the ""s around the 0 and the 1, like this:
Table.AddColumn(<the step immediately before>, "Is Active", each if [End Date] = null then 0 else 1)
Now you can create a measure
[Number of Active] = SUM(Table[Is Active])