if first(list([covered @ferc:SalesForResaleMajorNonmajor])) == "Major" false else true
taxonomy().concept(ferc:RespondentLegalName).label("http://ferc.gov/form/2020-01-01/roles/label/F1Header").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/F1Header").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/F1Header").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/F1Header").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,none) ); $data = if count(list({covered @ferc:SalesForResaleAxis=*})) > 0 list({covered @ferc:SalesForResaleAxis=* {list( if list({@ferc:OrderNumber @unit=* @period=$currentDuration}).length > 0 first(list({@ferc:OrderNumber @unit=* @period=$currentDuration})) else 0, if exists({@ferc:NameOfCompanyOrPublicAuthorityReceivingElectricityPurchasedForResale @unit @period=$currentDuration}) first(list({@ferc:NameOfCompanyOrPublicAuthorityReceivingElectricityPurchasedForResale @unit @period=$currentDuration})) else none, if exists({@ferc:RateScheduleTariffNumber @unit @period=$currentDuration}) first(list({@ferc:RateScheduleTariffNumber @unit @period=$currentDuration})) else none, if exists({@ferc:SalesForResaleAnnualMaximumDemand @unit @period=$currentDuration}) first(list({@ferc:SalesForResaleAnnualMaximumDemand @unit @period=$currentDuration})) else none, if exists({@ferc:MegawattHoursSoldSalesForResale @unit @period=$currentDuration}) first(list({@ferc:MegawattHoursSoldSalesForResale @unit @period=$currentDuration})) else none, if exists({@ferc:RevenueFromSalesOfElectricityForResaleRequirementsSales @unit @period=$currentDuration}) first(list({@ferc:RevenueFromSalesOfElectricityForResaleRequirementsSales @unit @period=$currentDuration})) else none )}}) else $data2; $uniqueData = list(for $x in $data if $x == list(0,none,none,none,none,none) skip else $x ); for $row in $uniqueData.sort
taxonomy().concept(ferc:ScheduleSalesForResaleShortAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F1FScheduleTitle").text PART XVIII: SALES FOR RESALE
taxonomy().concept(ferc:ScheduleSalesForResaleShortAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F1FInstructions").text
  1. Report below the information called for concerning sales for resale during the year to other electric utilities, cooperatives, and to cities and other public authorities for distribution to ultimate consumers.
  2. Enter the name of the purchaser in column (a). Abbreviate if necessary but do not truncate the name or use acronyms. Explain in a footnote any ownership interest or affiliation the respondent has with each purchaser.
  3. In column (b), identify the FERC Rate Schedule or Tariff Number.
  4. Report annual maximum demand in column (c). Demand must be in megawatts. Footnote any demand reported in column (c) which is not stated on a megawatt basis and explain.
  5. Report in column (d) the megawatt-hours shown on bills rendered to each purchaser.
  6. Report in column (e) the total charge shown on bills rendered to each purchaser.
  7. Footnote entries as required and provide explanations following all required data.
Line No. /** THIS CODE EXCLUDES ELEMENT NAMES AS THERE ARE NO ELEMENT SPECIFIC COLUMNS **/ $headings = filter (taxonomy().concept(ferc:ScheduleSalesForResaleShortAbstract).references("http://ferc.gov/form/2020-01-01/roles/reference/columnDetails")) where ($item.part-by-name(ferc-part:Schedule).part-value == "F1F - 018 - Schedule - Sales for Resale") $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] Title of Account
$row (a)
1 $row[2] ABC Company $row[4] 555 $row[5] 1,028 $row[6] 514,247