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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have table that shows sales for 3 different years (2018,2019,2020), and I would like to compare the difference in percentage of the sales year to date . For example: Sales accumulated from January 2020 until October 2020 and sales from January 2019 and October 2019. Is there any way I can compute a function that calculates this percentage automatically based on the same amount of months each year.
Here is what I am looking for:
Solved! Go to Solution.
Create 2 measures for YTD and LYTD and then calculate the percentage diff:
YTD = CALCULATE(SUM(Table6[Amount]),DATESYTD('Calendar'[Date]))
YTD LY = CALCULATE(Table6[YTD],SAMEPERIODLASTYEAR('Calendar'[Date]))
Measue = ([YTD] - [YTD LY]) / [YTD LY]
It seems that the Change % is a column and not a measure.
You should create a measure.
Also the table that you are showing us contains the raw data table.
What is the actual table that you are planning to use on the report. What fields and measures is it going to have?
Create 2 measures for YTD and LYTD and then calculate the percentage diff:
YTD = CALCULATE(SUM(Table6[Amount]),DATESYTD('Calendar'[Date]))
YTD LY = CALCULATE(Table6[YTD],SAMEPERIODLASTYEAR('Calendar'[Date]))
Measue = ([YTD] - [YTD LY]) / [YTD LY]
Thank you for your reply.
I have created the 2 measures and the column with percentage diff calculation. However, it returns an infinte sign. If it helps here a sample the table.
Could you send a snapshot of the table on PowerBI where the infinite sign appears?
The table that you sent has only 2018 data. Could you share the PBIX file and mask any confidential data?
This is the table that I am working on right now. Please, if you need the file let me know and I will dm you. Thanks in advance for your time.
It seems that the Change % is a column and not a measure.
You should create a measure.
Also the table that you are showing us contains the raw data table.
What is the actual table that you are planning to use on the report. What fields and measures is it going to have?
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 |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |