Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to create measure to display value from previous label without calculated column

Hi,

 

How can I create a measure which can be populated for each row in [# Issues in Prev Month] based on [# Issues] of the previous label without using a calculated column? The label is actually a month, but is not in the default month format.

 

 # Issues# Issues in Prev Month
2018M1250
2019M0135
2019M0243
2019M0354
1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

Please see the example below

LM Sales =
CALCULATE(
[Sales Amount], -- Mesure 
PREVIOUSMONTH('Date'[Date]) --PREVIOUSMONTH function with Date field from Calendar table
)

Hope this helps
Mariusz

View solution in original post

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

Please see the example below

LM Sales =
CALCULATE(
[Sales Amount], -- Mesure 
PREVIOUSMONTH('Date'[Date]) --PREVIOUSMONTH function with Date field from Calendar table
)

Hope this helps
Mariusz
Anonymous
Not applicable

Hi @Mariusz ,

 

I have tried the PREVIOUSMONTH function but to not much success... The label does not seem to be recognised as a month.

 

The error says "A column specified in the call to function 'PREVIOUSMONTH' is not of type 'DATE'. This is not supported."

 

 

Hi @Anonymous 

You can use the below patern 

Add Column // 

Rank =
RANKX(
ALL(Table1),
INT(SUBSTITUTE(Table1[Month], "M", "")),,
ASC
)

Add Measure:~
PM Value =
VAR PM = MIN(Table1[Rank]) -1
RETURN
CALCULATE(
SUM(Table1[Value]),
ALL(Table1),
Table1[Rank] = PM
)

 

Anonymous
Not applicable

Hi @Mariusz, Unfortunately this also does not work as my column of values are actually calculated values and not really a column in the data model, so it seems like the sum() function will not accept my "column" of measures. Thanks for your help. I will try to obtain the column of dates to make the PREVIOUSMONTH work instead.

Hi @Anonymous 

 

You can use MAX instead 

Mariusz

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.