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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
j_w
Helper IV
Helper IV

How to generate daily level data from monthly level data?

There is a Budget table:

Year    MonthNo    User        MonthlyBudget    BusinessDaysInMonth

2017   1                   David       2200.00                   22

2017   2                   David       2000.00                   20

... ...

2017   12                 David       2100.00                   21

2017   1                   James      2200.00                   22

2017   2                   James      2000.00                   20

... ...

2017   12                 James      2100.00                   21

 

How to generate another daily budget table in Power BI as following:

Date               User       DailyBudget    Day

2017-01-01     David     0                        Sunday

2017-01-02     David     100                    Monday

2017-01-03     David     100                    Tuesday

... ...

2017-12-28     David     100                    Thursday

2017-12-29     David     100                    Friday

2017-12-30     David      0                        Saturday

2017-12-31     David      0                        Sunday

2017-01-01     James     0                        Sunday

2017-01-02     James     100                    Monday

2017-01-03     James     100                    Tuesday

... ...

2017-12-28     James    100                    Thursday

2017-12-29     James    100                    Friday

2017-12-30     James    0                        Saturday

2017-12-31     James    0                        Sunday

 

Thanks.

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @j_w,

 

First, we need a date table.

Date =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2017, 12, 31 ) ),
    "MonthNum", MONTH ( [Date] )
)

Second, we add a column "DailyBudget" in the table "Budget".

DailyBudget =
'Budget'[ MonthlyBudget] / 'Budget'[ BusinessDaysInMonth]

Third, we would get the result with this formula.

 

Result =
SELECTCOLUMNS (
    FILTER (
        CROSSJOIN ( 'Date', 'Budget' ),
        'Budget'[ MonthNo] = 'Date'[MonthNum]
            && YEAR ( 'Date'[Date] ) = 'Budget'[Year]
    ),
    "Date", [Date],
    "User", [User],
    "Day", FORMAT ( [Date], "dddd" ),
    "DailyBudget", IF ( WEEKDAY ( [Date], 2 ) IN { 6, 7 }, 0, [DailyBudget] )
)

How to generate daily level data from monthly level data.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @j_w,

 

First, we need a date table.

Date =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2017, 12, 31 ) ),
    "MonthNum", MONTH ( [Date] )
)

Second, we add a column "DailyBudget" in the table "Budget".

DailyBudget =
'Budget'[ MonthlyBudget] / 'Budget'[ BusinessDaysInMonth]

Third, we would get the result with this formula.

 

Result =
SELECTCOLUMNS (
    FILTER (
        CROSSJOIN ( 'Date', 'Budget' ),
        'Budget'[ MonthNo] = 'Date'[MonthNum]
            && YEAR ( 'Date'[Date] ) = 'Budget'[Year]
    ),
    "Date", [Date],
    "User", [User],
    "Day", FORMAT ( [Date], "dddd" ),
    "DailyBudget", IF ( WEEKDAY ( [Date], 2 ) IN { 6, 7 }, 0, [DailyBudget] )
)

How to generate daily level data from monthly level data.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-jiascu-msft

 

Thanks for your solution.

 

Could you have a look at another post?

http://community.powerbi.com/t5/Desktop/How-to-generate-daily-level-data-from-monthly-level-data-Pos...

 

Regards

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Users online (508)