Forum Discussion
Table with different date columns
Hi williamgood ,
There is a way to create a table with different date filters for each column is to use the DAX function CALCULATE to modify the filter context of each measure. For example, you can create two measures like this:
Last Month Count =
CALCULATE ( COUNT ( Table[Item] ), PREVIOUSMONTH ( Table[Date] ) )
YTDCOUNT =
CALCULATE ( COUNT ( Table[Item] ), DATESYTD ( Table[Date] ) )
These measures will count the number of items in the last month and year to date, respectively, based on the date column in your table. You can then add these measures to your table visual along with the item column.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Thank you for your help!
I am getting an error when using this measure?
Here is some sample data (please ignore the dates as these do not fall into last month, but I hope you get the idea)
| Order ID | Date | Full Closure Category Name |
| SR00150905 | 11/08/2023 07:45:00 | Coke |
| SR00150907 | 11/08/2023 08:05:00 | Pepsi |
| SR00150913 | 11/08/2023 08:22:00 | Pepsi |
| SR00097671 | 13/01/2023 10:22:09 | Orange |
| SR00097672 | 13/01/2023 10:27:23 | Cranbury |
| SR00097673 | 13/01/2023 10:27:37 | Coke |