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

DAX Calculation

Hi,

I have a Matrix Chart in as per the below picture i want to get the Grand sum from July till the selected month. Like if i selected the October it should give me the grand total from July to October of Qty - TransferOut  
which is a measure. but i write this DAX that is not working the result in column V5 it is still giving me the same current months Qty - TransferOut . 

 

Hexxa_0-1697009487057.png

 

3 REPLIES 3
Powerbi_Jockey
Frequent Visitor

Do you required running total until selected month?

Anonymous
Not applicable

Hi @Hexxa ,

First, please make sure that the fields which applied on the year and month slicers are not from the same table with the field [Qty - TransferOut]. And create a date dimension table if there is no this table in your model. DON'T create any relationship with the fact table. Then you can create a measure as below to get it.

Cumulative Total =
VAR SelectedYear =
    SELECTEDVALUE ( 'Date'[Year] )
VAR SelectedMonth =
    SELECTEDVALUE ( 'Date'[MonthNo] )
RETURN
    CALCULATE (
        SUM ( 'Table'[Qty - TransferOut] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            YEAR ( 'Table'[Date] ) = SelectedYear
                && MONTH ( 'Table'[Date] ) >= 7
                && MONTH ( 'Table'[Date] ) <= SelectedMonth
        )
    

In addition,  you can refer the following links to get it.

Solved: Cumulative total until the selected month - Microsoft Fabric Community

Best Regards

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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