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
loganwol
Microsoft Employee
Microsoft Employee

How do I define a value that can be used as a constant in multiple places (like measures)

Hi,

 

I'm looking to use a constant value (which is a date) that i can edit and update so that I can change my report to only show data relevant to Today - (Constant Value).

Bit of context, I have a report for current candidates hiring and their respective status in the "queue". I periodically send out the report (every week but sometimes it might becomes the last 10 days). I have a few measures such as total number of candidates which is easy but I also have some measures that has to show number of incoming candidates in the last n days. Right now I end up manually editing the measure to a specific value and have realized I forget one of the places at least.

I thought I can create a manual table with the value and then update it but soon realized that manually created tables in PBI are not updateable.

Any other way to accomplish this?

 

Regards 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Just create a measure like this:

 

TheAnswertotheUltimateQuestionofLifetheUniverseandEverything = 42

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
v-haibl-msft
Microsoft Employee
Microsoft Employee

@loganwol

 

I think you can also do it with Query Parameters. I’d like to give a simple sample. I assume we have a table like below.

How do I define a value that can be used as a constant in multiple places (like measures)_1.jpg

 

We can create a parameter and enable load to make it available to be referenced later.

How do I define a value that can be used as a constant in multiple places (like measures)_2.jpg

 

Now we can create a measure with following formula. And the parameter can be edited later.

UsersForCurrentDate = 
CALCULATE (
    SUM ( Table1[users] ),
    FILTER ( Table1, Table1[Date] = VALUES ( Parameter1[Parameter1] ) )
)

How do I define a value that can be used as a constant in multiple places (like measures)_3.jpg

 

Best Regards,

Herbert

Interesting, I was looking to use the query parameters. The Enable load flag was the part i was missing. Will give it a try.

Greg_Deckler
Community Champion
Community Champion

Just create a measure like this:

 

TheAnswertotheUltimateQuestionofLifetheUniverseandEverything = 42

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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!

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