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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Month on month comparison

Hi,

 

Raw data:

Date                Sales     Customer name

25-07-2020       500      Pavan

26-07-2020       800     suresh

27-07-2020       1000    sai

28-07-2020        500    naresh

01-06-2020        200    somu

25-06-2020        600    venkat

26-06-2020        800     sasi

 

 

i want output below in power bi 

 

Filter       flter

july        june

Customer name     july date sales   june datesales

Pavan                     500

suresh                    800 

sai                          1000

naresh                   500

somu                                              200

venkat                                            600

sai                                                   800

 

i dont have permission to send the raw data please consider raw above one.

 

Regards,

 

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

First create a column as below:

 

Month = FORMAT('Table'[Date],"mmmm")&" "& "dates sales"

 

Then put the Month in the column field of a matrix and you will see:

 

 

 

 

 

Annotation 2020-07-30 163644.pngAnnotation 2020-07-30 163658.png

For the related .pbix file,pls see attached.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

Here is a copy using your data 

 

PBIX 

amitchandak
Super User
Super User

@Anonymous , Try like. You need two date table, both have month year in that. Keep slicer from each one .

 

measure1 =
var _min = minX(allselected(Date,Date[Date]))
var _max = manX(allselected(Date,Date[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))

 

Use the crossfilter is Date is joined and active.

measure2 =
var _min = minX(allselected(Date1,Date1[Date]))
var _max = manX(allselected(Date1,Date1[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))
//calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max), crossfilter(Table[Date],Date[Date],none))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
CC182
New Member

Hi, 

 

Try using the Matrix visualization with the following: 

- Rows: Customer name

- Columns: Date (month)

- Value: Sales

Anonymous
Not applicable

Hi,

How to select filter month on month comparasion dynamically.

 

 

Regards,

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.