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.
Hi,
I have the following Dax Formula which is not returning the expected Result:
Solved! Go to Solution.
Thx for the reply.
Made a mistake in my explanation. It should be 2 or 3.
Somehow when I changed my logic to Equal blank () or 0 it worked. Dunno if the <> operator was reading it the wrong way.
The 2nd if statement in your code is checking for current benefits being 2 or 3, but in your explanation you are checking for it to be 1 or 2. Try
Dev. -1 month Benefits On Track KPI =
VAR _PreviousMonthBenefitsOnTrackKPI =
CALCULATE (
SUM ( Initiatives[Benefits on track] ),
Initiatives[Snapshot type] = "End of month",
HistoricalDatesInitiatives[Month relative today] = -1
)
VAR _CurrentBenefitsOnTrackKPI = [Current Benefits On Track KPI]
RETURN
IF (
NOT ( _PreviousMonthBenefitsOnTrackKPI IN { 1, 2, 3 } )
&& _CurrentBenefitsOnTrackKPI = 1,
1,
IF (
NOT ( _PreviousMonthBenefitsOnTrackKPI IN { 1, 2, 3 } )
&& _CurrentBenefitsOnTrackKPI IN { 1, 2 },
-1,
_PreviousMonthBenefitsOnTrackKPI - _CurrentBenefitsOnTrackKPI
)
)
Thx for the reply.
Made a mistake in my explanation. It should be 2 or 3.
Somehow when I changed my logic to Equal blank () or 0 it worked. Dunno if the <> operator was reading it the wrong way.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
24 | |
12 | |
11 | |
10 |