Forum Discussion
Countrows not working properly
- 1 year ago
Hi All,
The issue was with the filter function inside the calculate function. I removed the filter and directly applied the condition and it worked. Thanks for your help!
Prev_Sales =Var r_year = SELECTEDVALUE('Table'[Year])var r_month = SELECTEDVALUE('Table'[Reporting Month Number])VAR prev_month = IF(r_month = 1, 12, r_month - 1)VAR prev_year = IF(r_month = 1, r_year - 1, r_year)RETURNCALCULATE(SUM('Table'[Sales]),'Table'[Year] = prev_year && 'Table'[Reporting Month Number] = prev_month)RegardsVivek N
Hi All,
The issue was with the filter function inside the calculate function. I removed the filter and directly applied the condition and it worked. Thanks for your help!
- Anonymous1 year agoNot applicable
Hi vivek_babu
Glad to know that you found the cause of the problem and solved it.
Thank you for sharing your solution. Please consider accepting your reply as a solution that will benefit other users experiencing similar problem.Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- vivek_babu1 year agoHelper II
Hi Anonymous ,
Yes i did! Thank You!
RegardsVivek N