taxonomy().concept(ferc:RespondentLegalName).label("http://ferc.gov/form/2020-01-01/roles/label/F2Header").text Name of Respondent:

[@ferc:RespondentLegalName @period=$currentDuration] Duke Energy Kentucky, Inc.
taxonomy().concept(ferc:SubmissionType).label("http://ferc.gov/form/2020-01-01/roles/label/F2Header").text This report is:
(1) if missing({covered @concept=ferc:SubmissionType}) ☐ An Original']]> else if [@concept=ferc:SubmissionType @period=$currentDuration] == "O" ☑ An Original']]> else ☐ An Original']]> An Original
(2) if missing([covered @concept=ferc:SubmissionType @period=$currentDuration]) ☐ A Resubmission']]> else if [@concept=ferc:SubmissionType @period=$currentDuration] == "R" ☑ A Resubmission']]> else ☐ A Resubmission']]> A Resubmission
taxonomy().concept(ferc:ReportDate).label("http://ferc.gov/form/2020-01-01/roles/label/F2Header").text Date of Report:
[@ferc:ReportDate @period=$currentDuration] 04/26/2019
taxonomy().concept(ferc:ReportYearPeriod).label("http://ferc.gov/form/2020-01-01/roles/label/F2Header").text Year/Period of Report:
End of: [@ferc:ReportYear @period=$currentDuration] 2018 / [@ferc:ReportPeriod @period=$currentDuration] Q4
// adding a comment $data2 = list(for $i in range(20) list($i,none,none,none,none) ); $data = if count(list({covered @ferc:GasUsedInUtilityOperationsAxis=*})) > 0 list({covered @ferc:GasUsedInUtilityOperationsAxis=* {list( if list({@ferc:OrderNumber @unit=* @period=$currentDuration}).length > 0 first(list({@ferc:OrderNumber @unit=* @period=$currentDuration})) else 0, if exists({@ferc:GasUsedForOtherUtilityOperationsDescription @unit@period=$currentDuration}) first(list({@ferc:GasUsedForOtherUtilityOperationsDescription @unit @period=$currentDuration})) else none, if exists({@ferc:GasUsedForOtherUtilityOperationsAccountCharged @unit @period=$currentDuration}) first(list({@ferc:GasUsedForOtherUtilityOperationsAccountCharged @unit @period=$currentDuration})) else none, if exists({@ferc:QuantityOfNaturalGasDeliveredByRespondentGasUsedForOtherUtilityOperations @unit @period=$currentDuration}) first(list({@ferc:QuantityOfNaturalGasDeliveredByRespondentGasUsedForOtherUtilityOperations @unit @period=$currentDuration})) else none, if exists({@ferc:GasUsedForOtherUtilityOperationsCredit @unit @period=$currentDuration}) first(list({@ferc:GasUsedForOtherUtilityOperationsCredit @unit @period=$currentDuration})) else none )}}) else $data2; $uniqueData = list(for $x in $data if $x == list(0,none,none,none,none) skip else $x ); for $row in $uniqueData.sort
taxonomy().concept(ferc:ScheduleGasUsedInUtilityOperationsAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F2ScheduleTitle").text Gas Used In Utility Operations
taxonomy().concept(ferc:ScheduleGasUsedInUtilityOperationsAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F2Instructions").text
  1. Report below details of credits during the year to Accounts 810, 811, and 812.
  2. If any natural gas was used by the respondent for which a charge was not made to the appropriate operating expense or other account, list separately in column (c) the Dth of gas used, omitting entries in column (d).
Line No. $headings = filter (taxonomy().concept(ferc:ScheduleGasUsedInUtilityOperationsAbstract).references("http://ferc.gov/form/2020-01-01/roles/reference/columnDetails")) where ($item.part-by-name(ferc-part:Schedule).part-value == "331 - Schedule - Gas Used in Utility Operations") $headings = list(for $ref in $headings list($ref.part-by-name(ferc-part:Column).part-value, $ref.part-by-name(ferc-part:ColumnName).part-value)) $heading_dict = dict(for $row in $headings list("("+$row[1]+")",$row[2]) ); for $row in $heading_dict.keys.sort
$heading_dict[$row] Purpose for Which Gas Was Used
$row (a)
1 taxonomy().concept(ferc:GasUsedForCompressorStationFuelCredit).label("http://ferc.gov/form/2020-01-01/roles/label/F2GasUsedInUtilityOperations").text
810 Gas Used for Compressor Station Fuel - Credit
max(list([covered @concept=ferc:QuantityOfNaturalGasDeliveredByUtilityGasUsedForCompressorStationFuel @period=$currentDuration])) 681,825 dth max(list([covered @concept=ferc:GasUsedForCompressorStationFuelCredit @period=$currentDuration])) $1,550,244
2 taxonomy().concept(ferc:GasUsedForProductsExtractionCredit).label("http://ferc.gov/form/2020-01-01/roles/label/F2GasUsedInUtilityOperations").text
811 Gas Used for Products Extraction - Credit
max(list([covered @concept=ferc:QuantityOfNaturalGasDeliveredByRespondentGasUsedForProductsExtraction @period=$currentDuration])) 0 dth max(list([covered @concept=ferc:GasUsedForProductsExtractionCredit @period=$currentDuration])) $0
3 taxonomy().concept(ferc:NaturalGasShrinkageAndOtherUsageInRespondentOwnProcessingCredit).label("http://ferc.gov/form/2020-01-01/roles/label/F2GasUsedInUtilityOperations").text
Gas Shrinkage and Other Usage in Respondent's Own Processing
max(list([covered @concept=ferc:QuantityOfNaturalGasShrinkageAndOtherUsageInRespondentOwnProcessing @period=$currentDuration])) 0 dth max(list([covered @concept=ferc:NaturalGasShrinkageAndOtherUsageInRespondentOwnProcessingCredit @period=$currentDuration])) $0
4 taxonomy().concept(ferc:NaturalGasShrinkageAndOtherUsageInRespondentGasProcessedByOthersCredit).label("http://ferc.gov/form/2020-01-01/roles/label/F2GasUsedInUtilityOperations").text
Gas Shrinkage and Other Usage in Respondent's Own Processing
max(list([covered @concept=ferc:QuantityOfNaturalGasShrinkageAndOtherUsageInRespondentOwnProcessing @period=$currentDuration])) 0 dth max(list([covered @concept=ferc:NaturalGasShrinkageAndOtherUsageInRespondentOwnProcessingCredit @period=$currentDuration])) $0
5 5 $row[2] "padding-4" Gas Used - Unaccounted For $row[4] 278,361 dth $row[5] $708,589
25 taxonomy().concept(ferc:GasUsedInUtilityOperationCredit).label("http://ferc.gov/form/2020-01-01/roles/label/F2Total").text
Total
max(list([covered @concept=ferc:QuantityOfNaturalGasDeliveredByRespondentGasUsedInUtilityOperations @period = $currentDuration])) 7,319,694 dth max(list([covered @concept=ferc:GasUsedInUtilityOperationCredit @period=$currentDuration])) $20,218,091