- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get previous month values based on Month year column values
Hi Community member,
Need help to get some desired result.
Below is the my dataset.
and I already create a measure to calcualte the values for previous months for column automated. below is the measure:
and my table look like below and that is absoluty fine:
But i want to show previous month data based on MonthName column [column name shown on first screenshot] and when i use monthname column on table then previous month data is showing 0. see below pic.
Please suggest. how can i use monthname column to calculate previous months data based on projectname?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a date table and mark it as a date table. There's lots of articles and videos on how to do that. Link your date table to the date column in your fact table, and then use columns from your date table in the visuals. Your measure using PREVIOUSMONTH will then work if you change the date column to the date column from the date table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi @AmitSaini ,
try like:
...
VAR pvevious=
CALCULATE(
SUM(Status[Automated],
EOMONTH(Status[datevalue], 0) = EOMONTH(MAX(Status[datevalue]), -1)
)
...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi FreemanZ,
Thanks for you reply.
I tried your suggestion but it won't works when we use monthname column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create a date table and mark it as a date table. There's lots of articles and videos on how to do that. Link your date table to the date column in your fact table, and then use columns from your date table in the visuals. Your measure using PREVIOUSMONTH will then work if you change the date column to the date column from the date table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
06-29-2024 09:45 PM | |||
08-03-2023 02:39 AM | |||
12-10-2023 10:47 PM | |||
01-20-2024 06:00 AM | |||
06-23-2023 12:54 AM |