Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)
I have a problem with my data, I was asked to set weekly from monthly targets and want to divide the targets by weeks in months and my data is not showing the first of every month

I need to show the data by showing the data start with the week

1 Answer

0 votes
by (22.5k points)
edited by

                 Follow this measure

//calculated columns in calendar table

Weekday = WEEKDAY('calendar table'[Date],2) 

Weeknum = WEEKNUM('calendar table'[Date], 2) 

Weeknum by month = 

CALCULATE(

    COUNT('calendar table'[Weeknum]),

    FILTER(

        'calendar table',

        'calendar table'[Date].[MonthNo] = EARLIER('calendar table'[Date].[MonthNo]) 

        &&

        'calendar table'[Weekday] = 7

    )

)

Start of week = 

CALCULATE(

    MAX('calendar table'[Date]),

    FILTER(

        'calendar table',

        'calendar table'[Weeknum] = EARLIER('calendar table'[Weeknum]) && 'calendar table'[Weekday] = 1

    )

//measure

Weekly Target = MAX(Sheet9[Target]) / MAX('calendar table'[Weeknum by month])

 Want to learn more about Power Bi, Refer: Power Bi Training

Related questions

0 votes
1 answer
asked Mar 3, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...