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 Everyone,
Can you please help me with this, For the below query how to show blank for
the future months?
Eg : August month showing -44.6% Now I want it to show a blank Value
Measure Below :
% Automated Order EU - Previous Month =
VAR CurrentAcual = [% Automated order EU]
VAR PreviousActual =
CALCULATE (
[% Automated order EU],
ALLSELECTED ( 'SM Dim Calendar' ),
'SM Dim Calendar'[Fiscal Month Number]
= MAX ( 'SM Dim Calendar'[Fiscal Month Number] ) - 1
)
RETURN
CurrentAcual - COALESCE ( PreviousActual, CurrentAcual )
I want the output like this below:
Thanks in advance
Solved! Go to Solution.
Hi,
Thanks for the response.
I am using a Live connection
I just used this measure and its working now
% Automated Order Global - Previous Month =
VAR CurrentActual = [% Automated order]
VAR PreviousActual =
CALCULATE (
[% Automated order],
ALLSELECTED ( 'SM Dim Calendar' ),
'SM Dim Calendar'[Fiscal Month Number]
= MAX ( 'SM Dim Calendar'[Fiscal Month Number] ) - 1
)
VAR CurrentMonthNumber = MONTH(TODAY()) +1
VAR SelectedMonthNumber = SELECTEDVALUE('SM Dim Calendar'[Fiscal Month Number])
RETURN
IF (
SelectedMonthNumber >= CurrentMonthNumber,
BLANK(),
CurrentActual - COALESCE ( PreviousActual, CurrentActual )
)
I got the result 🙂
Hi, @SupriyaVarun
To ensure that future months show as blank, you can add a condition that checks whether the month is in the future, and if it is, returns BLANK(). You can use the TODAY() function to get the current date and use it for the comparison.
try this
% Automated Order EU - Previous Month =
VAR CurrentDate = TODAY()
VAR CurrentMonth = MONTH(CurrentDate)
VAR CurrentYear = YEAR(CurrentDate)
VAR CurrentFiscalMonthNumber =
LOOKUPVALUE(
'SM Dim Calendar'[Fiscal Month Number],
'SM Dim Calendar'[Calendar Year], CurrentYear,
'SM Dim Calendar'[Calendar Month], CurrentMonth)
VAR CurrentAcual = [% Automated order EU]
VAR PreviousActual =
CALCULATE (
[% Automated order EU],
ALLSELECTED ( 'SM Dim Calendar' ),
'SM Dim Calendar'[Fiscal Month Number]
= MAX ( 'SM Dim Calendar'[Fiscal Month Number] ) - 1
)
RETURN
IF (
MAX('SM Dim Calendar'[Fiscal Month Number]) > CurrentFiscalMonthNumber,
BLANK(),
CurrentAcual - COALESCE ( PreviousActual, CurrentAcual )
)
note: Please note that you should adjust this based on your fiscal year start month if it does not start in January.
Proud to be a Super User!
Hi,
Thanks for the response.
I am using a Live connection
I just used this measure and its working now
% Automated Order Global - Previous Month =
VAR CurrentActual = [% Automated order]
VAR PreviousActual =
CALCULATE (
[% Automated order],
ALLSELECTED ( 'SM Dim Calendar' ),
'SM Dim Calendar'[Fiscal Month Number]
= MAX ( 'SM Dim Calendar'[Fiscal Month Number] ) - 1
)
VAR CurrentMonthNumber = MONTH(TODAY()) +1
VAR SelectedMonthNumber = SELECTEDVALUE('SM Dim Calendar'[Fiscal Month Number])
RETURN
IF (
SelectedMonthNumber >= CurrentMonthNumber,
BLANK(),
CurrentActual - COALESCE ( PreviousActual, CurrentActual )
)
I got the result 🙂
how about SelectedMonthNumber > CurrentMonthNumber, instead of SelectedMonthNumber >= CurrentMonthNumber?
Proud to be a Super User!
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 |