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

Actual by day vs Budget by month Analysis

Hello guys!

I'm new with Power BI, and I'm trying to achieve a really common scenario.

I have experience with another tool that create relationships in a fairly easy way, but I'm not sure how to do this.  I have two spreadsheets, one with all account movements by day and the budget table, by month.

 

I had to pivot my budget table, like this:

 

sheet.PNGto pivot.PNG

 

And created a first of month column on my "Account movements table"

 

bw.PNG

 

With this, I can no longer create a relationship between the "IT Concept" column because I don't have the many to many option, so I created another IT Concept table. But my problem is that I cannot link the StartofMonth column, to my Date column on the pivot table, as it is a many to many relationship.

 

Do I need to create a fourth table with dates only to achieve this?

 

I'll really appreciate any help. Best regards!

3 ACCEPTED SOLUTIONS
Phil_Seamark
Employee
Employee

Sounds like you need a DATE table, which I have in pretty much every data model I have ever built

 

You can do this easily enough in DAX by using the following command

 

Dates = CALENDARAUTO()

You can add columns to this table for other grouping (like, Months and Years etc)


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

I see, thanks!

So then I just create relationships to the Dates table from my data tables, right?

View solution in original post

Yeah, and you use this as the filter table.

 

The main thing is you can easily add columns to your date table like this :

 

MonthID = INT( FORMAT('Dates'[Date],"YYYYMM"))

 

and 

 

Month = FORMAT('Dates'[Date] , "MMM YY")

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

4 REPLIES 4
Phil_Seamark
Employee
Employee

Sounds like you need a DATE table, which I have in pretty much every data model I have ever built

 

You can do this easily enough in DAX by using the following command

 

Dates = CALENDARAUTO()

You can add columns to this table for other grouping (like, Months and Years etc)


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

I see, thanks!

So then I just create relationships to the Dates table from my data tables, right?

Yeah, and you use this as the filter table.

 

The main thing is you can easily add columns to your date table like this :

 

MonthID = INT( FORMAT('Dates'[Date],"YYYYMM"))

 

and 

 

Month = FORMAT('Dates'[Date] , "MMM YY")

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Awesome, thanks!

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.