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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
KS_learner
Frequent Visitor

X Axis using selected month as M and then M+1, M+2 and so on (to compare 2 years of orders)

Hi

I want to visualize the below chart in PowerBI for every selected month.

For eg if the selected month is Aug (for order date) 

Aug = M

Sep = M+1

Oct = M+2  and so on.

Similarly if selected month is Jul

Jul = M

Aug = M+1

Sep = M+2 and so on

The idea is to compare data for two years

KS_learner_0-1664231927204.png

is this possible? if yes is it very complicated.

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

Hi @KS_learner ,

You need to create a slicer base on base table ,and then use a measure to filter table. Due to not with your base table ,you could refer the below:

Create slicer table:

Slicer = SELECTCOLUMNS('Table',"Month",'Table'[month])

Create filter measure:

filter = IF(MAX('Table'[month])>=SELECTEDVALUE('slicer'[month]),1,0)

 

Output result:

vluwangmsft_0-1664269555222.pngvluwangmsft_1-1664269568509.png

 

Best Regards

Lucien 

thanks! But i think i forgot to mention that the X axis is the requested date and the filter needs to be the order date. so the dates are 2 separate dates. do you know how to do that?

also the increment can be beyond 12 as well. So for eg - if a customer places an order in Sep'22 he could request it even in Oct'23. So the X asix should show customer requested date all the way to M+13 in this case (M being Sep).. is my question clear?

 

Helpful resources

Announcements
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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