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
alecsio
Regular Visitor

Same month previous year with filter

Hi

 

I need your help to find a solution to work around this problem. I've checked already in the community but I couldn't find any real solution. Scenario:

- Table A: Date Table (Complete Date, Day, Month, Year...)

- Table B: Sales

- Slider date filter on date table in relationship with the date of the sales table

 

I'm trying to study the sales of the period I choose in the filter compared to the one of the same period of the previous year. In addition I created a new measure that says the forecast sales to the end of the month and I would like to compare it to the sales of the same month of the previous year creating a new measure.

What I obtained is the total amount of the sales of the previous year. I have no problem to have the sales of the exact period of the previous year but I have problem to have the total sales of the entire month of the previous year.

I hope it's clear.

This is the formula that gives me the total sales of the previous year to which I need to add the filter of the month. 

FatturatoAnnoPrecedenteTotMese= CALCULATE(SUM(ALESSIO_MX_MOVIMENTI_CLIENTI[TotDoc]);ALLEXCEPT(ALESSIO_MX_MOVIMENTI_CLIENTI;ALESSIO_MX_MOVIMENTI_CLIENTI[AGENTE]);ALESSIO_MX_MOVIMENTI_CLIENTI[CSG_DOC_ORI]="BC"||ALESSIO_MX_MOVIMENTI_CLIENTI[CSG_DOC_ORI]="FT";PREVIOUSYEAR(ALESSIO_MX_MOVIMENTI_CLIENTI[DTT_DOC_ORI]))

Let me know if there are other ways to have the same result.

 

Thank you to all

 

Alessiosales.png

 

1 ACCEPTED SOLUTION
alecsio
Regular Visitor

Ok I think I've found a solution such as:

PARALLELPERIOD(DateDimension[Date];-12;MONTH))

 

thank you

View solution in original post

2 REPLIES 2
alecsio
Regular Visitor

Ok I think I've found a solution such as:

PARALLELPERIOD(DateDimension[Date];-12;MONTH))

 

thank you

alecsio
Regular Visitor

Hi

 

I need your help to find a solution to work around this problem. I've checked already in the community but I couldn't find any real solution. Scenario:

- Table A: Date Table (Complete Date, Day, Month, Year...)

- Table B: Sales

- Slider date filter on date table in relationship with the date of the sales table

 

I'm trying to study the sales of the period I choose in the filter compared to the one of the same period of the previous year. In addition I created a new measure that says the forecast sales to the end of the month and I would like to compare it to the sales of the same month of the previous year creating a new measure.

What I obtained is the total amount of the sales of the previous year. I have no problem to have the sales of the exact period of the previous year but I have problem to have the total sales of the entire month of the previous year.

I hope it's clear.

This is the formula that gives me the total sales of the previous year to which I need to add the filter of the month. 

FatturatoAnnoPrecedenteTotMese= CALCULATE(SUM(ALESSIO_MX_MOVIMENTI_CLIENTI[TotDoc]);ALLEXCEPT(ALESSIO_MX_MOVIMENTI_CLIENTI;ALESSIO_MX_MOVIMENTI_CLIENTI[AGENTE]);ALESSIO_MX_MOVIMENTI_CLIENTI[CSG_DOC_ORI]="BC"||ALESSIO_MX_MOVIMENTI_CLIENTI[CSG_DOC_ORI]="FT";PREVIOUSYEAR(ALESSIO_MX_MOVIMENTI_CLIENTI[DTT_DOC_ORI]))

Let me know if there are other ways to have the same result.

 

Thank you to all

 

Alessio

 

 

 

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.