Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 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.
I have one table with actual and historical data for our employees. Each employee has one row for each month they work in our company. The two columns I like to use in my data table are the date (which is formatted as a data type with dd MMMM yyyy) and the FTE (formatted as a decimal number).
My desired output is a matrix visualization with the total FTE sum for the newest month (in this case 30 September 2019) and then the comparison (in absolutes and percentages) versus the previous month (in this case , versus the last month of the previous year (in this case 31 December 2018) and versus the same month last year (in this case 30 September 2018).
When I update the data set, the values for the newest month will change to 31 October 2019, for previous month will change to 30 September 2019 and for the same month last year will change to 31 October 2018.
I have been breaking my head around this for some days, but I guess I'm still too much in Excel mode in my thinking. Any help would therefore be much appreciated 🙂
Solved! Go to Solution.
Hi @Nipius - Please try the following:
Previous Month Value =
CALCULATE(
SUM(YourTable[YourColumn]),
PREVIOUSMONTH('Date'[Date])
)
Previous Year Value =
CALCULATE(
SUM(YourTable[YourColumn]),
SAMEPERIODLASTYEAR('Date'[Date])
)
Hi @Nipius - Please try the following:
Previous Month Value =
CALCULATE(
SUM(YourTable[YourColumn]),
PREVIOUSMONTH('Date'[Date])
)
Previous Year Value =
CALCULATE(
SUM(YourTable[YourColumn]),
SAMEPERIODLASTYEAR('Date'[Date])
)
Thanks a ton, @Anonymous ! Could it be that you forgot to attached the sample script? 🙂
Thanks so much, @Anonymous! Really helpful 🙂
And apologies for the delayed response. I had to go offline for some time, hence this radio silence. Again, really appreciate your support!
Hi @Nipius ,
here are some tips for getting quick replies in the forum:
How to Get Your Question Answered Quickly
Cheers,
Sturla
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
84 | |
69 | |
68 | |
39 | |
37 |