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
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
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.