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
Wahid777
Frequent Visitor

Fetching values from previous month

Hi there

 

I'm trying to fetch values from previous month to eventually calculate a MoM variance % but my measure returns with too many arguements error. 

 

I've tried CALCULATE(SUM[Signups], PREVIOUSMONTH([Month])

 

I have the following table

 

Wahid777_0-1617935599777.png

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Wahid777 

 

Please check the below pictures.

It is better to have Dim-Date-Table in order to conveniently use the time-intelligent-DAX-function in Power BI.

And the connection between the two tables is needed.

 

 

All measures are in the sample pbix file's link down below.

 

Picture5.pngPicture6.png

 

https://www.dropbox.com/s/3m2d6kqk7rjn501/Wahid777.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @Wahid777 

 

Please check the below pictures.

It is better to have Dim-Date-Table in order to conveniently use the time-intelligent-DAX-function in Power BI.

And the connection between the two tables is needed.

 

 

All measures are in the sample pbix file's link down below.

 

Picture5.pngPicture6.png

 

https://www.dropbox.com/s/3m2d6kqk7rjn501/Wahid777.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Thank you

 

I understand the sorting of the table was a mess but i was only able to get it this way from the database. You're table dimension is the perfect approach to this.

 

However, since I couldn't change the table, I was able to export the data to excel and used pivot table there to arrange them seperately and used another similar table to calculate the MoM variance % using the first table (transformed using pivot table) as the data source. 

Wahid777
Frequent Visitor

PS: The Month column's data type is date/time and has data from 2020 and 2021. It is fetched from sql but I can't connect it to Power BI because the SQL Server tables has way too many binary IDs. I've grouped by the data i need in sql and copied it in excel and then loaded to power bi from the excel file. 

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.