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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NISHA_S
Resolver I
Resolver I

calculate % of diff in power bi

 

 

Capture.PNG

This is an sample excel data.Here , for the third column (% of Diff) is calculated based on formula (B2-B1)/(B1).How we can calculated this column in Power bi,If i have first and second column in power bi?

 

2 REPLIES 2
v-xulin-mstf
Community Support
Community Support

Hi @NISHA_S,

 

Sorry, i'm not sure about the calculation logic of '(B2-B1)/(B1)'.

Could you provide more details?

 

Best Regards,

Link

amitchandak
Super User
Super User

@NISHA_S , if you do not have date , create a date column like

 

Date = "01 " & [monthly] //change datatype to date.

 

Then join ith with date table and try measures like

 

MTD = CALCULATE(Average(Table[Value]),DATESMTD('Date'[Date]))
last MTD = CALCULATE(Average(Table[Value),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month = CALCULATE(Average(Table[Value),previousmonth('Date'[Date]))

 

diff = [MTD]-[last MTD]
diff % = divide([MTD]-[last MTD],[last MTD])

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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