Forum Discussion

parvathisuku_90's avatar
5 years ago
Solved

Need help with parameter

I have create a parameter named 'AssetID'

I need to use the same parameter in my measure 

Per Asset = CALCULATE(
    AVERAGE('cbdb alarm_occurences'[qty_alarms_7day]),
    'cbdb alarm_occurences'[grid_element_key]
        IN { "75e76b7c-19f3-4119-a043-859331e74c12" }
Instead of "75e76b7c-19f3-4119-a043-859331e74c12" I want use parameter AssetID
Can some please help

7 Replies

  • nandukrishnavs's avatar
    nandukrishnavs
    Community Champion

    parvathisuku_90 

     

    You cannot directly use the parameter inside the DAX measure. But you can create a reference of the parameter. Then it will act as a table. After that, you can use it in DAX measure.

     

    Attaching the PBIX file for your reference.

     

    • parvathisuku_90's avatar
      parvathisuku_90
      Helper I

      How can I convert parameter to table. Can you please provide an example.

      • nandukrishnavs's avatar
        nandukrishnavs
        Community Champion

        parvathisuku_90 

         

        1. Open Edit Query window
        2. Right-click on Parameter
          1.  

        3. Click Reference
        4. Then click on convert To Table
          1.