Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good evening,
Hoping someone can help me figure this out. I've tried many different options but none of them was efficient.
I have a model with 2 tables, the human resource database with the hours, áreas, and types of consultant, and a calendar table.
I've done two measures with simple things. "Horas contratadas"
and
I have this table:
and what I wanted is like :
And I need to predict the rest of hours based on recent consumption (based on last 3/6 months)
Solved! Go to Solution.
HI @josegracaaxians,
Sure, I think these date range not existed in your fact table, right?
IF that is the case, I'd like to suggest you change the 'horas realizadas' expression to check if the current calendar date existed in your table.
Then you can find out the last date which has value as the output for the not existed date ranges.
horas realizadas =
VAR currDate =
MAX ( 'Calendar'[Date] )
VAR _lastDate =
MAXX ( ALLSELECTED ( Eventos ), [Date] )
VAR lastResult =
CALCULATE (
SUM ( Eventos[horas] ),
FILTER ( ALLSELECTED ( Eventos ), [Date] = _lastDate )
)
RETURN
IF ( currDate >= _lastDate, lastResult, SUM ( Eventos[horas] ) )
Regards,
Xiaoxin Sheng
HI @josegracaaxians,
I'm not so clear for expressions that use in the measure, can you please share the formula about 'Horas realizadas' ?
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Good morning,
'Horas realizas is a simple sum of database :
Thank You for your attencion.
HI @josegracaaxians,
Sure, I think these date range not existed in your fact table, right?
IF that is the case, I'd like to suggest you change the 'horas realizadas' expression to check if the current calendar date existed in your table.
Then you can find out the last date which has value as the output for the not existed date ranges.
horas realizadas =
VAR currDate =
MAX ( 'Calendar'[Date] )
VAR _lastDate =
MAXX ( ALLSELECTED ( Eventos ), [Date] )
VAR lastResult =
CALCULATE (
SUM ( Eventos[horas] ),
FILTER ( ALLSELECTED ( Eventos ), [Date] = _lastDate )
)
RETURN
IF ( currDate >= _lastDate, lastResult, SUM ( Eventos[horas] ) )
Regards,
Xiaoxin Sheng
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
124 | |
79 | |
50 | |
38 | |
38 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |