Forum Discussion
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 .
3 Replies
- AnonymousNot 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
- lbendlinSuper 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-Forum/ba-p/963216
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/1447523 - Powerbi_JockeyFrequent Visitor
Do you required running total until selected month?