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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Select any 2 periods using filter to compare its sales amount differences

Hi, 

I currently run monthly sales plan sheet and readers want to select 2 period to see the differences.

 

e.g.

currently month vs last month

January vs March

April vs August

etc

 

 

So the feature I would like to develop is, 

there's selection filter to choose any 2 period then measure can calculate the gap. 

 

for this, how can I create the filter and measures? so that I can put the measure into table next to each Quarter column to see the gap. 

 

 

jeongkim_0-1693971286421.png

 

jeongkim_1-1693971310769.png

 

 

 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

That data is not well structured.  Using the Query Editor, we will first have to transform the data insto a structure that makes the data amenable to slicing/filtering.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Put your periods into a slicer.  Then force the user to select exactly two items (via FILTERS()  - your users will love that!)  and then in your measure grab the MIN and MAX values of that column, and structure your measure accordingly.

Anonymous
Not applicable

Thanks for the guidance, can you help me draw the measure? 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.