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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
alexbalazsalex
Helper IV
Helper IV

Measure Help

Dears i would need your help for a measure : i have a table with sales by month , i created another table with dates which i linked many to one: than i created a formula to calculate prices ; Price = DIVIDE(sum('Price Evolution'[Amount]),sum('Price Evolution'[Pieces])) Than based on this i created the following: Price Base = CALCULATE([Price],filter('Price Evolution','Price Evolution'[Calender Year_Month]=[Previous Month] Where Previous Month = SELECTEDVALUE('Previous Month'[Previous Month]) so when i select a month from drop down it actively calculates price for that certain period. Than i want to show data by month as in below Pic with interaction broken to the drop down so it shows all months and what i would like is instead of Price by month to show the delta vs the price of the month i selected and PRice of the month. At this point if i use Price - Price Base it gives me 0 for all months Any ideas on this ? Thanks https://ibb.co/xDDkX26
3 REPLIES 3
amitchandak
Super User
Super User

@alexbalazsalex , for last month you can try time intelligence with date table

 

example

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hi @amitchandak 

 

Thanks for your quick reply,

 

This doesnt work for me as i want the difference not between the last month but the mont i selected.

 

Lets say i select price of Jan21, so the graph will show Jan21 price as 0 as its jan21-jan21, than we will have Feb21-Jan21, Mar21-Jan21, Apr21-Jan21 etc....

 

With the part of Jan to be chaned actively .

 

Thanks

Alex

@alexbalazsalex , Do you need to slicer to select the month and take diff ?

 

 

if yes, then refer, else share some example output

How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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