Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
22 | |
17 | |
17 | |
11 | |
7 |
User | Count |
---|---|
27 | |
26 | |
12 | |
12 | |
12 |