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
rmarindti
New Member

Totals using a measure

I am using a measure to represent either column A (Real) or column B (Escenario) for each month switching over the selected month.  

 

rmarindti_0-1700824412723.png

 

rmarindti_1-1700824590694.png

 

The representation in the month columns works fine, but the calculated Total is the sum of the whole Column A  (Jan-Dec) instead of the sum of each represented column (Jan - Oct Column A + Nov- Dec Column B)

 

Is there any way I can achieve the sum of (Jan - Oct Column A + Nov- Dec Column B)

 

 

Thank you!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your semantic model.

 

Jihwan_Kim_1-1700892773781.png

 

Jihwan_Kim_2-1700893087378.png

 

Expected result measure: =
SUMX (
    VALUES ( 'Calendar'[Year-Month sort] ),
    IF (
        CALCULATE ( MAX ( 'Calendar'[Year-Month sort] ) )
            <= MAX ( 'Slicer calendar'[Year-Month sort] ),
        CALCULATE ( SUM ( Data[Real] ) ),
        CALCULATE ( SUM ( Data[Scenario] ) )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your semantic model.

 

Jihwan_Kim_1-1700892773781.png

 

Jihwan_Kim_2-1700893087378.png

 

Expected result measure: =
SUMX (
    VALUES ( 'Calendar'[Year-Month sort] ),
    IF (
        CALCULATE ( MAX ( 'Calendar'[Year-Month sort] ) )
            <= MAX ( 'Slicer calendar'[Year-Month sort] ),
        CALCULATE ( SUM ( Data[Real] ) ),
        CALCULATE ( SUM ( Data[Scenario] ) )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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