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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
joshua1990
Post Prodigy
Post Prodigy

Compare to selected Months with each other

Hello everyone!

I have a huge transactional table that is archived per month. This table lists all future orders.

Now I would like to compare the current archived data with the last archived data.

For this purpose, I would like to place a filter where I can select the months.

 

But how can I build a measure that compares the differences between each archive?

 

 

 

 

 

 

1 REPLY 1
amitchandak
Super User
Super User

@joshua1990 , for standard comparison you use time inteliggnce

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]))
next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))

 

 

If you an archived month no same as standard month , the try like

Period Rank = RANKX(all('Period'),'Period'[year period],,ASC,Dense) //archived year month //YYYYMM
This Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])))
Last Period = CALCULATE(sum('order'[Qty]), FILTER(ALL('Period'),'Period'[Period Rank]=max('Period'[Period Rank])-1))

 

In place of range use month

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

 

OR

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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