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

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

Reply
Anonymous
Not applicable

Measure Value convert to Text

Hi,

 

i have a trivial question but i dont can solve this issue Smiley LOL .

So i have this Measure, a static string/text "2018", get the result and works fine. 😉

1.png

1.2.PNG

But now i want to replace the static stuff to dynamic measure "LastYear" and get this issue:

2.png

 

1.1.PNG

2.1.PNG

 

When i show both Measure "LastYear and ActualYear" in a card, table,.. then it show me the correct result "2018" & "2019"

 

I hope you can help me and thanks in advance

 

Kind regards,

Unknown

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Anonymous - 

Try it with a variable instead of a measure.

Variables can be loaded with a value and that value can then be used.

Measures are evaluated at the point in which they are used. So in your measure, there is probably something else affecting it.

 

General variable usage:

 

Previous Year = 
var my_variable = max('Date'[Year])
return my_variable - 1

Cheers!

Nathan

View solution in original post

AlB
Community Champion
Community Champion

Hi @Anonymous 

It looks like you are using the simplified syntax for the filter parmeters in the CALCULATE where it is not allowed. 

Instead of

CALCULATE(SUM( ...); Table1[Geschäftsjahr] = [LastYear])

try

CALCULATE( SUM( ...);

                    FILTER( ALL(Table1[Gefächstjahr]); Table1[Geschäftsjahr] = [LastYear]) )

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@Anonymous - 

Try it with a variable instead of a measure.

Variables can be loaded with a value and that value can then be used.

Measures are evaluated at the point in which they are used. So in your measure, there is probably something else affecting it.

 

General variable usage:

 

Previous Year = 
var my_variable = max('Date'[Year])
return my_variable - 1

Cheers!

Nathan

AlB
Community Champion
Community Champion

Hi @Anonymous 

It looks like you are using the simplified syntax for the filter parmeters in the CALCULATE where it is not allowed. 

Instead of

CALCULATE(SUM( ...); Table1[Geschäftsjahr] = [LastYear])

try

CALCULATE( SUM( ...);

                    FILTER( ALL(Table1[Gefächstjahr]); Table1[Geschäftsjahr] = [LastYear]) )

 

Anonymous
Not applicable

@AlB  & @Anonymous  Thanks, both approach works. 🙂 🙂

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors