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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
lassuied
Advocate I
Advocate I

Using the result of a DAX formula as a Parameter

Hello Everyone,

 

I created a table called "Parameters" and a measure in this table called "YearReport".

 

In DAX I have done a simple formula where : YearReport = 2017

 

Now I would like to use this to filter my other DAX but Power BI doesn't let me use the filter ... the thing is if I type 2017 in the filter it is working, but not the DAX, here is an example :

 

CountofContractsCY = calculate(COUNTA(v_e2AllColumns[ContractDetail_NumberUnderContract]),'1_PrincipaleTable2'[Scenarios]=[YearReport],v_e2AllColumns[LotDemographics_IsPhysicalLocationFlag]=True)

 

Is there anything else I can do to keep that dynamicity ?

 

Thank you !

 

1 ACCEPTED SOLUTION

Thank you for your reply ! I was continuing in digging and I found out that no relationship existed between my parameters table and the other ones ... Thank you for your help though !

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

There could be lots going on here. Are you getting an error in your DAX? Are you sure that your YearReport and Scearios are of the same data type? Some sample/mock source data would be helpful. Might also want to investigate VAR perhaps. You might have to use an aggregation function in your formula, like MAX([YearReport]). Tough to say.



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...

Thank you for your reply ! I was continuing in digging and I found out that no relationship existed between my parameters table and the other ones ... Thank you for your help though !

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.