<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xule="http://xbrl.us/xendr/2.0/template"
    xmlns:ixt1="http://www.xbrl.org/inlineXBRL/transformation/2010-04-20"
    xmlns:ixt4="http://www.xbrl.org/inlineXBRL/transformation/2020-02-12"
    xmlns:ferc="http://ferc.gov/form/2026-04-01/ferc" xmlns:ferc-part="http://www.ferc.gov/form/parts">

<head>
    <title>Template - F1/F3Q - 397</title>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
    <link rel="stylesheet" type="text/css" href="form-template.css" />
</head>

<body class="xbrl" id="ScheduleAmountsIncludedInIsoOrRtoSettlementAbstract">
    <table class="schedule-header xbrl" width="100%">
        <tr>
            <td class="xbrl">
                <xule:replace>
                    <xule:expression class="hide">
                        taxonomy().concept(ferc:RespondentLegalName).label("http://ferc.gov/form/2020-01-01/roles/label/F1Header").text
                    </xule:expression>
                    <xule:template-display>Name of Respondent:</xule:template-display>
                </xule:replace><br/>
                
                <xule:replace>
                    <xule:expression class="hide" fact="true">[@ferc:RespondentLegalName @period=$currentDuration]
                    </xule:expression>
                    <xule:template-display>Name of Respondent:</xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl">
                <xule:replace>
                    <xule:expression class="hide">
                        taxonomy().concept(ferc:SubmissionType).label("http://ferc.gov/form/2020-01-01/roles/label/F1Header").text
                    </xule:expression>
                    <xule:template-display>This report is:</xule:template-display>
                </xule:replace><br/>
                
                (1)
                <xule:replace>
                    <xule:expression html="true" class="hide">if missing({covered @concept=ferc:SubmissionType})
                        "<![CDATA[
                                <span class=\"checkbox\">&#9744;</span> An Original]]>" else if
                        [@concept=ferc:SubmissionType @period=$currentDuration] == "O"
                        "<![CDATA[
                                <span class=\"checkbox\">&#9745;</span> An Original]]>" else
                        "<![CDATA[
                                <span class=\"checkbox\">&#9744;</span> An Original]]>"
                    </xule:expression>
                    <xule:template-display>
                        <input type="checkbox" /> An Original
                    </xule:template-display>
                </xule:replace><br/>
                
                (2)
                <xule:replace>
                    <xule:expression html="true" class="hide">if missing([covered @concept=ferc:SubmissionType
                        @period=$currentDuration])
                        "<![CDATA[
                                <span class=\"checkbox\">&#9744;</span> A Resubmission]]>" else if
                        [@concept=ferc:SubmissionType @period=$currentDuration] == "R"
                        "<![CDATA[
                                <span class=\"checkbox\">&#9745;</span> A Resubmission]]>"
                        else
                        "<![CDATA[
                                <span class=\"checkbox\">&#9744;</span> A Resubmission]]>"
                    </xule:expression>
                    <xule:template-display>
                        <input type="checkbox" checked="checked" /> A Resubmission
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl">
                <xule:replace>
                    <xule:expression class="hide">
                        taxonomy().concept(ferc:ReportDate).label("http://ferc.gov/form/2020-01-01/roles/label/F1Header").text
                    </xule:expression>
                    <xule:template-display>Date of Report:</xule:template-display>
                </xule:replace><br/>
                
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:date-month-day-year">[@ferc:ReportDate @period=$currentDuration]
                    </xule:expression>
                    <xule:template-display>04/26/2019</xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl">
                <xule:replace>
                    <xule:expression class="hide">
                        taxonomy().concept(ferc:ReportYearPeriod).label("http://ferc.gov/form/2020-01-01/roles/label/F1Header").text
                    </xule:expression>
                    <xule:template-display>Year/Period of Report:</xule:template-display>
                </xule:replace><br/>
                
                End of: <xule:replace>
                    <xule:expression class="hide" fact="true">[@ferc:ReportYear @period=$currentDuration]
                    </xule:expression>
                    <xule:template-display>2018</xule:template-display>
                </xule:replace>
                <span>/</span>
                <xule:replace>
                    <xule:expression class="hide" fact="true">[@ferc:ReportPeriod @period=$currentDuration]
                    </xule:expression>
                    <xule:template-display>Q4</xule:template-display>
                </xule:replace>
            </td>
        </tr>
    </table>
    <table class="xbrl" width="100%">
        <tr class="sch-title">
            <td class="xbrl" colspan="6">
                <xule:replace>
                            <xule:expression class="hide">taxonomy().concept(ferc:ScheduleAmountsIncludedInIsoOrRtoSettlementAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F1ScheduleTitle").text
                            </xule:expression>
                            <xule:template-display>
                                AMOUNTS INCLUDED IN ISO/RTO SETTLEMENT STATEMENTS
                            </xule:template-display>
                    </xule:replace>
            </td>
        </tr>
        <tr>
            <td class="instruction xbrl" colspan="6">
                <xule:replace>
                    <xule:expression class="hide" html="true">taxonomy().concept(ferc:ScheduleAmountsIncludedInIsoOrRtoSettlementAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F1Instructions").text
                    </xule:expression>
                    <xule:template-display>
                    <ol>
                        <li>The respondent shall report below the details called for concerning amounts it recorded in Account 555, Purchase Power, and Account 447, Sales for Resale, for items shown on ISO/RTO Settlement Statements. Transactions should be separately netted for each ISO/RTO administered energy market for purposes of determining whether an entity is a net seller or purchaser in a given hour. Net megawatt hours are to be used as the basis for determining whether a net purchase or sale has occurred. In each monthly reporting period, the hourly sale and purchase net amounts are to be aggregated and separately reported in Account 447, Sales for Resale, or Account 555, Purchased Power, respectively.</li>
   
                    </ol>
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
            <tr class="col-heading-row">     
                <td class="col-heading xbrl line-number">Line No.</td>
                <td class="col-heading xbrl" xule:repeat="ColumnHeadings">
                        <xule:expression class="hide" name="ColumnHeadings">
                                $headings = filter (taxonomy().concept(ferc:ScheduleAmountsIncludedInIsoOrRtoSettlementAbstract).references("http://ferc.gov/form/2020-01-01/roles/reference/columnDetails")) where ($item.part-by-name(ferc-part:Schedule).part-value == "397 - Schedule - Amounts Included in ISO/RTO Settlement Statements") 
    
                                $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
                        </xule:expression>
                        <div style="text-align: center"><xule:replace>
                        <xule:expression class="hide" name="ColumnHeadings" part="1">$heading_dict[$row]</xule:expression>
                        <xule:template-display>
                                Description of Item(s)
                        </xule:template-display>
                    </xule:replace>
                </div>
                    <div style="text-align: center"><xule:replace>
                            <xule:expression class="hide" name="ColumnHeadings" part="2">$row</xule:expression>
                            <xule:template-display>
                                (a)
                            </xule:template-display>
                        </xule:replace></div>
                </td>
            </tr>
        <tr>
            <td class="xbrl line-number">1</td>

            <td class="xbrl description_items">
                     Energy
            </td>
            <td class="xbrl"></td>
            <td class="xbrl"></td>
            <td class="xbrl"></td>
            <td class="xbrl"></td>
        </tr> 
        <tr>
            <td class="xbrl line-number">2</td>
            <td class="xbrl description_items">
                Net Purchases (Account 555)
       </td>

            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPurchasedPower @period = $currentQ1Duration]))
                    </xule:expression>
                    <xule:template-display>
                        $11,859,030
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPurchasedPower @period = $currentCumQ2]))
                    </xule:expression>
                    <xule:template-display>
                        $54,224,053
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPurchasedPower @period = $currentCumQ3]))
                    </xule:expression>
                    <xule:template-display>
                        $83,226,981
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPurchasedPower @period = $currentCumQ4]))
                    </xule:expression>
                    <xule:template-display>
                        $96,317,355
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
        <tr>
            <td class="xbrl line-number">2.1</td>
            <td class="xbrl description_items">
                Net Purchases (Account 555.1)
       </td>

            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPowerPurchasedForStorageOperations @period = $currentQ1Duration]))
                    </xule:expression>
                    <xule:template-display>
                        $11,859,030
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPowerPurchasedForStorageOperations @period = $currentCumQ2]))
                    </xule:expression>
                    <xule:template-display>
                        $54,224,053
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPowerPurchasedForStorageOperations @period = $currentCumQ3]))
                    </xule:expression>
                    <xule:template-display>
                        $83,226,981
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetPurchasesPowerPurchasedForStorageOperations @period = $currentCumQ4]))
                    </xule:expression>
                    <xule:template-display>
                        $96,317,355
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
        <tr>
                <td class="xbrl line-number">3</td>
                <td class="xbrl description_items">
                    Net Sales (Account 447)
                </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetSales @period = $currentQ1Duration]))
                    </xule:expression>
                    <xule:template-display>
                        $1,759,665
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetSales @period = $currentCumQ2]))
                    </xule:expression>
                    <xule:template-display>
                        $3,927,607
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetSales @period = $currentCumQ3]))
                    </xule:expression>
                    <xule:template-display>
                        $7,643,676
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsEnergyNetSales @period = $currentCumQ4]))
                    </xule:expression>
                    <xule:template-display>
                        $14,694,716
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
        <tr>
                <td class="xbrl line-number">4</td>
                <td class="xbrl description_items">
                    Transmission Rights
                </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsTransmissionRights @period = $currentQ1Duration]))
                    </xule:expression>
                    <xule:template-display>
                        $2,768,275
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsTransmissionRights @period = $currentCumQ2]))
                    </xule:expression>
                    <xule:template-display>
                        $6,649,797
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsTransmissionRights @period = $currentCumQ3]))
                    </xule:expression>
                    <xule:template-display>
                        $17,116,032
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsTransmissionRights @period = $currentCumQ4]))
                    </xule:expression>
                    <xule:template-display>
                        $22,405,211
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
        <tr>
                <td class="xbrl line-number">5</td>
                <td class="xbrl description_items">
                    Ancillary Services
                </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsAncillaryServices @period = $currentQ1Duration]))
                    </xule:expression>
                    <xule:template-display>
                        $245,764
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsAncillaryServices @period = $currentCumQ2]))
                    </xule:expression>
                    <xule:template-display>
                        $231,243
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsAncillaryServices @period = $currentCumQ3]))
                    </xule:expression>
                    <xule:template-display>
                        $136,844
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlementsAncillaryServices @period = $currentCumQ4]))
                    </xule:expression>
                    <xule:template-display>
                        $389,879
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
        <tr>
                <td class="xbrl line-number">6</td>
                <td class="xbrl description_items">
                    Other Items (list separately)
                </td>
                <td class="xbrl"></td>
                <td class="xbrl"></td>
                <td class="xbrl"></td>
                <td class="xbrl"></td>
        </tr>
        
        <tr class="schedule-row" xule:repeat="IsoOrRtoSettlements">
            <xule:expression class="hide" name="IsoOrRtoSettlements">// adding a comment

                $data2 = list(for $i in range(7,45)
                list($i,none,none,none,none,none)
                );

                $data = if count(list({covered @ferc:AmountsIncludedInIsoOrRtoSettlementStatementsAxis=*})) > 0

                list({covered @ferc:AmountsIncludedInIsoOrRtoSettlementStatementsAxis=* {list(

                if list({@ferc:OrderNumber @unit=* @period=$currentDuration}).length > 0
                    first(list({@ferc:OrderNumber @unit=* @period=$currentDuration}))
                else
                    0,
                if list({@ferc:IsoOrRtoSettlementsDescriptionOfOtherItems @unit @period=$currentDuration}).length > 0
                    first(list({@ferc:IsoOrRtoSettlementsDescriptionOfOtherItems @unit @period=$currentDuration}))
                else
                    none,
                   
                if list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentQ1Duration}).length > 0
                    first(list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentQ1Duration}))
                else
                    none,
                if list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentCumQ2}).length > 0
                    first(list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentCumQ2}))
                else
                    none,
                if list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentCumQ3}).length > 0
                    first(list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentCumQ3}))
                else
                    none,
                if list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentCumQ4}).length > 0
                    first(list({@ferc:IsoOrRtoSettlementsOtherItems @unit @period=$currentCumQ4}))
                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    


            </xule:expression>

            <td class="xbrl line-number">
                <xule:lineNumber class="hide" name="IsoOrRtoSettlements">
                    <xule:startNumber>7</xule:startNumber>
                </xule:lineNumber>
             </td>
            
            <td class="xbrl description_items">
                <xule:replace>
                    <xule:expression class="hide" name="IsoOrRtoSettlements" fact="true" part="2">$row[2]</xule:expression>
                </xule:replace>
                <xule:template-display>
                    Various
                </xule:template-display>
            </td>
            
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" name="IsoOrRtoSettlements" fact="true" format="ixt4:num-dot-decimal" part="3">$row[3]</xule:expression>
                </xule:replace>
                <xule:template-display>
                    $7,951
                </xule:template-display>
            </td>
            
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" name="IsoOrRtoSettlements" fact="true" format="ixt4:num-dot-decimal" part="4">$row[4]</xule:expression>
                </xule:replace>
                <xule:template-display>
                    $27,416
                </xule:template-display>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" name="IsoOrRtoSettlements" fact="true" format="ixt4:num-dot-decimal" part="5">$row[5]</xule:expression>
                </xule:replace>
                <xule:template-display>
                    $52,892
                </xule:template-display>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" name="IsoOrRtoSettlements" fact="true" format="ixt4:num-dot-decimal" part="6">$row[6]</xule:expression>
                </xule:replace>
                <xule:template-display>
                    $69,971
                </xule:template-display>
            </td>
        
        </tr>
    
        <!-- Line 46 for Total -->
        <tr>
            <td class="xbrl line-number">46</td>
            <td class="xbrl description_items">
                     TOTAL
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlements @period =
                        $currentQ1Duration]))
                    </xule:expression>
                    <xule:template-display>
                        $6,883,519
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlements @period =
                        $currentCumQ2]))
                    </xule:expression>
                    <xule:template-display>
                        $42,784,274
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlements @period =
                        $currentCumQ3]))
                    </xule:expression>
                    <xule:template-display>
                        $56,613,303
                    </xule:template-display>
                </xule:replace>
            </td>
            <td class="xbrl monetary_items">
                <xule:replace>
                    <xule:expression class="hide" fact="true" format="ixt4:num-dot-decimal">first(list([covered
                        @concept=ferc:IsoOrRtoSettlements @period =
                        $currentCumQ4]))
                    </xule:expression>
                    <xule:template-display>
                        $56,927,662
                    </xule:template-display>
                </xule:replace>
            </td>
        </tr>
    </table>
    <p></p>
    <div class="schedule-footer">

        <div>FERC FORM NO. 
                <xule:replace>
                        <xule:expression class="hide" fact="true">first(list([@ferc:FormType @period=$currentDuration]))
                                                                
                                                        </xule:expression>
                        <xule:template-display>1</xule:template-display>
                </xule:replace>
                <span> </span>
                <xule:replace>
                        <xule:expression class="hide">" (" + taxonomy().concept(ferc:ScheduleAmountsIncludedInIsoOrRtoSettlementAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F1DateRevised").text + ")"
                        </xule:expression>
                        <xule:template-display>
                                (NEW. 12-05)
                        </xule:template-display>
                </xule:replace>
                            
        </div>
        <div class="center-text">Page 
                <xule:replace>
                        <xule:expression class="hide">taxonomy().concept(ferc:ScheduleAmountsIncludedInIsoOrRtoSettlementAbstract).label("http://ferc.gov/form/2020-01-01/roles/label/F1PageRange").text
                        </xule:expression>
                        <xule:template-display>
                        397
                        </xule:template-display>
                </xule:replace>
        </div> 
    </div>
    </body>
    </html>