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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Comparison between two ranges in a table stored in one database - URGENT!

Hello everyone! Im Daniel, Talking from Brazil.

 

I'm having a massive trouble in Power Bi, and I realy dont know where Im going wrong.

 

I have one table in SQL that stores the "photos" of the database every begining of month. 

The idea is to have the possibility to analyse on the expected amount for the month, in DAX, the ones that I won, the ones that I Lost, the ones that I rearrenged the expectation and the ones that I havent done any actions about the expected closing.

For example. I have a foto of Feb/20 and another in Mar/20.
The colum "Photo Date" when equals to "Feb/20" show me all projects in Feb20. And when I compare it to Mar/20 I see what happened along the month with these projects.

I want, when the user select "Feb/20" the comparison goes automaticaly to "Mar/20"
They are sotred in the same database.

Witch Options do you think that is the best for comparison? I've been trying to do this for a long time and I'm not being successful.

 

 

.Base SampleBase Sample

 

Regards!

 

Daniel.

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1 Column2
A 1
B 2.5

 

For example. I have a foto of Feb/20 and another in Mar/20.
The column "Photo Date" when equals to "Feb/20" show me all projects in Feb20. And when I compare it to Mar/20 I see what happened along the month with these projects.

I want, when the user select "Feb/20" the comparison goes automatically to "Mar/20"

 you could create a measure for current month, and another one for the next month, using e.g. DATEADD in the CALCULATE

https://docs.microsoft.com/en-us/dax/dateadd-function-dax

to be more specific I would need a copyable version of your data

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

1 REPLY 1
Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1 Column2
A 1
B 2.5

 

For example. I have a foto of Feb/20 and another in Mar/20.
The column "Photo Date" when equals to "Feb/20" show me all projects in Feb20. And when I compare it to Mar/20 I see what happened along the month with these projects.

I want, when the user select "Feb/20" the comparison goes automatically to "Mar/20"

 you could create a measure for current month, and another one for the next month, using e.g. DATEADD in the CALCULATE

https://docs.microsoft.com/en-us/dax/dateadd-function-dax

to be more specific I would need a copyable version of your data

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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