Forum Discussion
Problems with accumulative count with a reference table
Hi , neozhang1
According to your description, when you put the 'Calendar'[Date] in the X-axis , the line will not be the rolling total.
According to your DAX, you are using SELECTEDVALUE('Turnover Schedule'[Type Date]) to get [Type Date], I have no test data and no corresponding relationship, for your [Date] and before [Type Date] It is also not very clear what the data relationship is.
First you can try to use the Matrix or Table visual object to display your value, and you can place the variable you defined separately, check whether the SELECTEDVALUE function gets the value you want, and if you need to use 'Calendar'[ The Date] field is used as the X-axis. If a relationship is created, then you can directly use the MAX(), VALUES() function to obtain the corresponding value; if no relationship is created, you need to use MAX('Calendar'[Date]) to Get the current context's date value before comparing.
Regarding your problem, without the data of the test environment, it is difficult to troubleshoot the problem for you immediately. If the above does not help you solve the problem, can you provide us with a test.pbix file without sensitive data, which can be uploaded to OneDrive Then send it to us in Link format.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly