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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Bakhtawar
Post Patron
Post Patron

Varaible in expression

I tried this expression 

 

Own_Damage_OS = VAR VpeDate = [VpeDate]
RETURN
CALCULATE (
    SUM ( OS_excel[OS_AMOUNT] ),Claims_excel[COVER_NAME]="Own",
   Premium_Excel[LOB] = "ABC",OS_excel[AS_OF_DATE]=VpeDate
   
)

i create and called varaible in expression now i want to call this same varaible "VpeDate" in all measures without creating this in every measure .. i.e i called this varaible globally . only once i want to create and called in everywhere.. 

 

is this possible 

1 REPLY 1
OwenAuger
Super User
Super User

Hi there,

There is no such thing as global variables in DAX unfortunately.

If you want multiple measures to refer to VpeDate, you would need to define it in each measure.

Regards,

Owen


Owen Auger
Did I answer your question? Mark my post as a solution!
Blog
LinkedIn

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.