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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply

Need help with parameter

I have create a parameter named 'AssetID'

parvathisuku_90_0-1600328976855.png

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
5 ACCEPTED SOLUTIONS
nandukrishnavs
Super User
Super User

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

 


Regards,
Nandu Krishna

View solution in original post

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

View solution in original post

@parvathisuku_90 

 

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

       

  3. Click Reference
  4. Then click on convert To Table
    1. nandukrishnavs_1-1600349258185.png

       

 


Regards,
Nandu Krishna

View solution in original post

@parvathisuku_90 

 

after = symbol, you could use selectedvalue() for getting the value.

selectedvalue() 

 


Regards,
Nandu Krishna

View solution in original post

Thank you!!!!! Working fine...

 

 

View solution in original post

7 REPLIES 7
nandukrishnavs
Super User
Super User

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

 


Regards,
Nandu Krishna

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

@parvathisuku_90 

 

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

       

  3. Click Reference
  4. Then click on convert To Table
    1. nandukrishnavs_1-1600349258185.png

       

 


Regards,
Nandu Krishna

As mentioned, I have added the table.But not able to access the same in my measure

parvathisuku_90_0-1600762553272.png

 

@parvathisuku_90 

 

after = symbol, you could use selectedvalue() for getting the value.

selectedvalue() 

 


Regards,
Nandu Krishna

Thank you!!!!! Working fine...

 

 

Hi @parvathisuku_90 ,

If the problem has been resolved, could you please mark the helpful post as Answered? It will help other members in the community find the solution easily if they face the similar problem with you. Thank you.

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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