Forum Discussion

lassuied's avatar
lassuied
Icon for Advocate I rankAdvocate I
9 years ago
Solved

Store a parameter in DAX and use it

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 !

 

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Greg, 

       

      Please share the duplicate thread. We are also looking for a solution like the same .