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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
CMccown
Helper I
Helper I

Calculate Season for Different Categories

I have data that has different seasons dependent upon category (see tables) and need a way to calculate these differences. I have a standard date table and a separate table that contains a column for two different rate types. Any help would be greatly appreciated!

Residential:

MonthSeason

January

Winter

FebruaryWinter
MarchWinter
AprilWinter
MayWinter
JuneSummer
JulySummer
AugustSummer
SeptemberSummer
OctoberWinter
NovemberWinter
DecemberWinter

 

Commercial

MonthSeason

January

Winter

FebruaryWinter
MarchWinter
AprilWinter
MaySummer
JuneSummer
JulySummer
AugustSummer
SeptemberSummer
OctoberSummer
NovemberWinter
DecemberWinter

 

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @CMccown ,

According to your description, I create a sample to reproduce your problem.

There're four tables in the sample. Residential and Commercial tables are the same with yours. Here's the other two tables:

Cost table:

vkalyjmsft_0-1666854408120.png

Cost table show the cost one day in different season.

Date table:

vkalyjmsft_2-1666854466205.png

Suppose you want to calculate the cost of all days in each month per different category. Calculate two measures.

CommercialCost =
SUMX (
    FILTER ( 'Date', 'Date'[Month] = MAX ( 'Commercial'[Month] ) ),
    COUNTROWS ( 'Date' )
        * MAXX (
            FILTER ( 'Cost', 'Cost'[Season] = MAX ( 'Commercial'[Season] ) ),
            'Cost'[Cost]
        )
)
ResidentialCost =
SUMX (
    FILTER ( 'Date', 'Date'[Month] = MAX ( 'Residential'[Month] ) ),
    COUNTROWS ( 'Date' )
        * MAXX (
            FILTER ( 'Cost', 'Cost'[Season] = MAX ( 'Residential'[Season] ) ),
            'Cost'[Cost]
        )
)

Result:

Residential:

vkalyjmsft_3-1666854831098.png

Commercial:

vkalyjmsft_4-1666854840035.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @CMccown ,

According to your description, I create a sample to reproduce your problem.

There're four tables in the sample. Residential and Commercial tables are the same with yours. Here's the other two tables:

Cost table:

vkalyjmsft_0-1666854408120.png

Cost table show the cost one day in different season.

Date table:

vkalyjmsft_2-1666854466205.png

Suppose you want to calculate the cost of all days in each month per different category. Calculate two measures.

CommercialCost =
SUMX (
    FILTER ( 'Date', 'Date'[Month] = MAX ( 'Commercial'[Month] ) ),
    COUNTROWS ( 'Date' )
        * MAXX (
            FILTER ( 'Cost', 'Cost'[Season] = MAX ( 'Commercial'[Season] ) ),
            'Cost'[Cost]
        )
)
ResidentialCost =
SUMX (
    FILTER ( 'Date', 'Date'[Month] = MAX ( 'Residential'[Month] ) ),
    COUNTROWS ( 'Date' )
        * MAXX (
            FILTER ( 'Cost', 'Cost'[Season] = MAX ( 'Residential'[Season] ) ),
            'Cost'[Cost]
        )
)

Result:

Residential:

vkalyjmsft_3-1666854831098.png

Commercial:

vkalyjmsft_4-1666854840035.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.