Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
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.
hi @AmitSaini ,
try like:
...
VAR pvevious=
CALCULATE(
SUM(Status[Automated],
EOMONTH(Status[datevalue], 0) = EOMONTH(MAX(Status[datevalue]), -1)
)
...
Hi FreemanZ,
Thanks for you reply.
I tried your suggestion but it won't works when we use monthname column.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |