Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jonny772
New Member

Column names in Summerize

Hi All, very new at this and still figuring my way around.
 
Im slightly confused in this case, the command below works well and in the second summerize 
 
Fuelimport[fuelType] ends up in column Source
"Generation" ends up in the column Sink.
 
Ideally, I need these the other way around but cannot figure out how to do this as the summerize command is using Fuelimport[fuelType]
 
 
Any pointers on my misunderstanding would be appreciated!
 
 
----------------------------------------
 
CalCtable =
UNION(
SUMMARIZE(Fuelimport,
Fuelimport[Source],
"Capacity(kWh)", SUM(Fuelimport[currentUsage]),
"Sink","UK Demand"
),
SUMMARIZE(CALCULATETABLE('Fuelimport','Fuelimport'[Source]=="Generation"),
Fuelimport[fuelType],
"Capacity(kWh)", SUM(Fuelimport[currentUsage]),
"Sink","Generation"))
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @jonny772 
Please try

CalCtable =
UNION (
    SUMMARIZE (
        Fuelimport,
        Fuelimport[Source],
        "Capacity(kWh)", SUM ( Fuelimport[currentUsage] ),
        "Sink", "UK Demand"
    ),
    SELECTCOLUMNS (
        SUMMARIZE (
            CALCULATETABLE ( 'Fuelimport', 'Fuelimport'[Source] == "Generation" ),
            Fuelimport[fuelType]
        ),
        "Source", "Generation",
        "Capacity(kWh)", CALCULATE ( SUM ( Fuelimport[currentUsage] ) ),
        "Sink", Fuelimport[fuelType]
    )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @jonny772 
Please try

CalCtable =
UNION (
    SUMMARIZE (
        Fuelimport,
        Fuelimport[Source],
        "Capacity(kWh)", SUM ( Fuelimport[currentUsage] ),
        "Sink", "UK Demand"
    ),
    SELECTCOLUMNS (
        SUMMARIZE (
            CALCULATETABLE ( 'Fuelimport', 'Fuelimport'[Source] == "Generation" ),
            Fuelimport[fuelType]
        ),
        "Source", "Generation",
        "Capacity(kWh)", CALCULATE ( SUM ( Fuelimport[currentUsage] ) ),
        "Sink", Fuelimport[fuelType]
    )
)

Brilliant thank you!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.