cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dgreen Regular Visitor
Regular Visitor

Use DAX expressions to set parameters?

Can you use DAX expressions to set parameters? Basically, I have a very large multi year detailed data set and a summary query. What I would like to do is use the summary query to present information and use any selections that are made in a direct query to the detail records. I figured this is best done by setting selections as parameters to be used in the direct query but I can't tell if it works yet.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Use DAX expressions to set parameters?

Hey,

 

PowerQuery queries are creating the "1st level" of the data model, the "2nd" level is created by something than can be considered as model processing, this "materializes" all the calculated column that have been added using DAX.

 

Finally a user interacts with the model (2nd level) by selecting values from a slicer, etc ...

 

These interactions can not be passed down to the levels that have been creating the data model. This explains why a measure can not be used inside a calculated column. From a technical point of view this is possibel, but the value of the calculated column will not change if the the measure will change, e.g. by a user interaction with the data model.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Super User III
Super User III

Re: Use DAX expressions to set parameters?

Hey,

 

unfortunately it's not possible to pass the value from any DAX statement to a parameter that is used to fetch data from a data source.

 

This in a way would be result into some kind of circular dependency.

As a data refresh, meaning "reading" data from a datasource, creates the basis for any DAX statements.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!
dgreen Regular Visitor
Regular Visitor

Re: Use DAX expressions to set parameters?

I can see how this could be an issue if I was using DAX to pass a parameter to the same query I used the DAX on, but I was hoping to taking selections from slicers/visuals built based off of query A, set it as a paramater, and use that in query B.

Super User III
Super User III

Re: Use DAX expressions to set parameters?

Hey,

 

PowerQuery queries are creating the "1st level" of the data model, the "2nd" level is created by something than can be considered as model processing, this "materializes" all the calculated column that have been added using DAX.

 

Finally a user interacts with the model (2nd level) by selecting values from a slicer, etc ...

 

These interactions can not be passed down to the levels that have been creating the data model. This explains why a measure can not be used inside a calculated column. From a technical point of view this is possibel, but the value of the calculated column will not change if the the measure will change, e.g. by a user interaction with the data model.

 

Regards,

Tom

Hamburg - Germany
If I answer your question, please mark my post as solution, this will also help others.
I accept Kudos :-), If you find my post helpful.

Proud to be a Datanaut!

View solution in original post

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors