Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
WillianRamos
Frequent Visitor

Problem with Percentage when comparing 2 year billing amounts

Hello, I need to compare the billing value of 2 years dynamically. for this I created 2 calendar tables and related them to the Invoice fact table and created the measures as shown below.


Base Year = CALCULATE(SUM('Invoices'[total]), ALL('dCalendarComparative'))

Compare Year = CALCULATE(SUM('Invoices'[total]), ALL('dCalendarBase'))


then I placed the year fields in the upper left part of the dashboard as shown in the image below and used parameters to filter by year, month or quarter.

these parameters look for information from the Invoices fact table, because that's where the general information is.

 

Param Chart = {
("Year", NAMEOF(Invoices[Year]), 0),
("Month", NAMEOF('Invoices'[MonthName]), 1),
("Quarter", NAMEOF('Invoices'[QuarterName]), 2)
}


in the first graph I just need the information of the values and it is returning me correctly. but in the bottom graph where I need the percentage it keeps returning me -100% and with all years. I need help to fix this.

 

the correct value is 36% as I put it on a card at the top.

 

% Measure = CALCULATE(DIVIDE([Compare Year], [Base Year]))-1

 

aaaa.png

 

2 REPLIES 2
amitchandak
Super User
Super User

@WillianRamos , Refer my approch

Power BI Abstract Thesis: How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

unfortunately not, the only problem I'm facing is the percentage issue, the rest is correct.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors