Forum Discussion
incorrect Column Total
- 6 years ago
I am getting memory issue if use sumx function. "There is not enough memory to complete the operation.
- 6 years ago
Hi, Aruljoy
Based on your description, I create data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create two calculated columns and a measure as below.
Calculated column: Month = FORMAT('Table'[Date],"mmm") Weeknum = "W"&WEEKNUM('Table'[Date]) Measure: Result = IF( ISINSCOPE('Table'[Weeknum]), SUM('Table'[Value]), CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Month] = SELECTEDVALUE('Table'[Month]))) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Aruljoy
Based on your description, I create data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create two calculated columns and a measure as below.
Calculated column:
Month = FORMAT('Table'[Date],"mmm")
Weeknum = "W"&WEEKNUM('Table'[Date])
Measure:
Result =
IF(
ISINSCOPE('Table'[Weeknum]),
SUM('Table'[Value]),
CALCULATE(SUM('Table'[Value]),FILTER(ALLSELECTED('Table'),'Table'[Month] = SELECTEDVALUE('Table'[Month])))
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Allan. This work for me.