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.
Hi..I am trying to figure out why this doesn't work. I'm trying to create a measure that will show actual + forecast ONLY for the current year of the selected Month-End Date filter. I have a TTM measure that works just fine, which I tried to modify for my current year. I am getting a T/F error for this part. I'm obviously not understanding how my _Year Variable needs to be changed, as that's the only thing that is different. Any help is appreciated!
VAR _Year=(SELECTEDVALUE('Date'[Year]))
Var LastActualsdate=calculate(Max('IT Expense'[EOM]),'IT Expense'[Scenario]="Actual",REMOVEFILTERS())
VAR Actuals=calculate([C&M Costs-Actuals],REMOVEFILTERS('Date'),KEEPFILTERS(_Year),USERELATIONSHIP('Date'[Date],'Disconnect Date'[Date]))
Return Actuals
BUT this works just fine.
TTM Actual C&M = VAR _SelDate=Max('Date'[Date])
VAR _PV13=DATESINPERIOD('Disconnect Date'[Date],_SelDate,-13,Month)
VAR _Result=Calculate([C&M Costs-Actuals],
REMOVEFILTERS('Date'),
KEEPFILTERS(_PV13),
USERELATIONSHIP('Date'[Date],'Disconnect Date'[Date]))
Return
_Result
Solved! Go to Solution.
Hi atowriss99,
SELECTEDVALUE returns a singular value, which is not compatible as a parameter of KEEPFILTERS. You're probably looking for something like KEEPFILTERS ( 'Date'[Year] = _Year ) or something.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
I finally figured it out! I used this:
Hi atowriss99,
SELECTEDVALUE returns a singular value, which is not compatible as a parameter of KEEPFILTERS. You're probably looking for something like KEEPFILTERS ( 'Date'[Year] = _Year ) or something.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
I finally figured it out! I used this:
atowriss99,
Awesome, glad you were able to figure it out. 😄
A few suggestions from me:
Maybe something like the below:
Full Year C&M Actuals =
VAR _Year = SELECTEDVALUE ( 'Date'[Year] )
CALCULATE (
[C&M Costs-Actuals],
FILTER (
ALL ( 'Date' ),
'Date'[Year] = _Year
),
USERELATIONSHIP ( 'Date'[Date], 'Disconnect Date'[Date] )
)
Just my thoughts. 😄
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
Thanks! I actually went in and cleaned it up already. It helps me trouble shoot when I have it all written out, so I can see/test what piece is incorrect
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
92 | |
82 | |
70 | |
64 |
User | Count |
---|---|
115 | |
106 | |
96 | |
81 | |
72 |