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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
royalty123
Regular Visitor

Super Urgent!! Need to change 3 months data and show in 6 months

Hi Users, I'm new to Power BI and need help. I'm not able to do it even after trying multiple trial and error methods.

We have X Projects and we take 60 hours to complete each Agile Project. The data shows that 60 hours are utilized for 3 months to complete the project. But we need to show the data in such a way that a project takes 6 months to complete not 3 months.

For example if "A" project takes 60 hours to complete in 3 months then we showed it as 60/3 so  Jan - 20 Hours, Feb - 20 Hours and March - 20 Hours

But now we want to show "A" project which takes 60 Hours to be completed in 6 months not 3 months so we divide 60/6 = Jan 10 hours, Feb - 10 Hours, March - 10 Hours, April - 10 Hours, May - 10 Hours and June 10 Hours. 

Please suggest what should I do for 6 months now? 

 
Thank you!

 

4 REPLIES 4
nandic
Memorable Member
Memorable Member

@royalty123 
I just use same condition provided above, but this would be the logic.
If project = "Agile", then use calculation based on 6 months, else use logic for 3 months.

Same approach for nextmonth calculations.

hourspending1 =
IF(
     WORKSMONTH[Projects] = "Agile",

 IF(NOT(ISBLANK(WORKSMONTH[Date])),IF(WORKSMONTH[HoursTotal]>=WORKSMONTH[hoursweek]*2,WORKSMONTH[HoursTotal]-WORKSMONTH[hoursweek]*2,BLANK()),BLANK()),
   IF(NOT(ISBLANK(WORKSMONTH[Date])),IF(WORKSMONTH[HoursTotal]>=WORKSMONTH[hoursweek]*2,WORKSMONTH[HoursTotal]-WORKSMONTH[hoursweek]*2,BLANK()),BLANK())
)


Cheers,
Nemanja Andic

nandic
Memorable Member
Memorable Member

@royalty123 in that case, i suggest that you add condition to calculated column:
nextmonth
nextmonth1
nextmonth2
nextmonth3
nextmonth4
nextmonth5

In these calculation you will add condition IF(WORKSMONTH[Projects] = "Agile", calculation for Agile, calculation for Software).

There will be no need then to change anything in this final Union table calculation as whole logic is set in calculated columns. Union table is just output of it.

Cheers,
Nemanja Andic

nandic
Memorable Member
Memorable Member

In addition, you will also need to add additional columns "hourspending" for each new month:
hourspending3
hourspending4
hourspending5
As this logic is used for current 3 months

nandic
Memorable Member
Memorable Member

@royalty123 this dax calculation uses union function to combine 3 parts of data (3 months):
1) selectcolumns ... worksmonths[Date] - current month
2) selectcolumns ... worksmonth[nextmonth1] - next month
3) selectcolumns ... worksmonth[nextmonth2] - in 2 months

So you need to create additional 3 columns in table Worksmonth:
nextmonth3
nextmonth4
nextmonth5
(based on login in columns nextmonth1 and nextmonth2)
And then to add 3 more parts in union  in this formula, for each month:

nandic_0-1715468877240.png


Cheers,
Nemanja Andic

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.