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
PradeepDive
Helper II
Helper II

New to Measures

Hi I am new to PowerBI so might be this would be a very basic question. Appreciate your help please.

 

So I have 3 tables Calender, Actuals and Allocations

 

Allocation and Actual table has Date and hours into it... both these tables are releated to Calendar table

 

Basically my current work gives me simple view as monthwise Allocated and Actual hours.

 

To move further I want to create a measure  which will check the date and give me Allocated hrs as

  1) < Current month then 0

  2) = Current month date then 15% of allocated hours

  3) > Current month entire Allocation hrs.

 

Please help

 

 

6 REPLIES 6
Greg_Deckler
Super User
Super User

So by Current month date you are talking about something like MONTH(TODAY()) && YEAR(TODAY()) = MONTH([Date]) && YEAR([Date]) yes or something different?

 

Sample data and expected output would be helpful. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Yes, thats correct

Hi @PradeepDive ,

 

Have you solved your problem?

 

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, please share your data sample and your desired output so that we could help further on it.

 

Best Regards,

Cherry

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

Nope ... not yet

Hi @PradeepDive ,

 

Could you share some sample data which could reproduce your scenario and your desired output so that we could help further on it?

 

Best Regards,

Cherry

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

Here is my Table structre

 

Allocation :   ID, Name, AllocationDate, AllocationHrs  (contain date as 1st of month only eg 1/1/18, 2/1/18)

Actual       : ID, Name, ActualDate, ActualHrs (contain date as 1st of month only eg 1/1/18, 2/1/18)

Calendar  : Date, Year, Month

 

Relationship

 

Allocation * to 1 Calendar

Actual * to 1 Calendar

 

Desired Output

Month - >  Hours

 

Calculation :

If Date < previous month(s) then  Hours = sum (Actual hours)

If Date = Current Month then Hours = Sum (Actual hours) + 15% of Allocation hours for the particular month

If Date  > Current Month then Hours = Sum (Acual hours) + Sum of (Allocated hours)

 

Please note Allocation and Actual date has only dates as 1st of month. there are no dates other than 1st of month.

for example allocation/actual date has only 1/1/18, 2/1/18 etc it does not have any dates as 1/15/18 etc

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.