Forum Discussion
Hexxa
2 years agoNew 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 O...
Anonymous
2 years agoNot 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