Forum Discussion
Cross filter ( to exclude )
- 5 years ago
Hi pbhat89 ,
Not sure what you mean by "I read online that we cannot reference variables from a temp table in power BI." but check the post below by SQLBI where they make references to how to use variables calculations and get data from those tables.
https://www.sqlbi.com/articles/table-and-column-references-using-dax-variables/
Regarding my second comment I was refering that you can use the new M query parameters to make a new table that picks up the slicer values filtering your data and then use that 3rd table to make your data visualization in conjunction with the slicer of the condition.
Check the blog post below:
https://blog.crossjoin.co.uk/2020/10/25/why-im-excited-about-dynamic-m-parameters-in-power-bi/
Hi pbhat89 ,
The use of the temporary table gives you that need that you want that is to create the table with only a few rows and then make calculations on top of it using the different columns that are withing that temporary table.
When having more than one measure related to other the calculations can become pretty strange, especcially if you have IF statements on the return syntax, more when you change context on a visualization the results can be also messy.
You can check the new M query parameter update that is based on a slicer selection maybe you can create a new table to make your slicer and then work out the not in from your other table.
https://powerbi.microsoft.com/en-us/blog/power-bi-october-2020-feature-summary/#_Toc52195564
Hi MFelix
When i create to create a temp table - it does not allow me to reference the columns in the calculate part. I read online that we cannot reference variables from a temp table in power BI.
For your other comment : could you advise how to do so?
If i have a table :
how do i create a dynamic table which updates based on filters on table 1 , and selection of above leading to changes in table 2 --> and table 1 thereafter ( not in part )
- MFelix5 years agoSuper User
Hi pbhat89 ,
Not sure what you mean by "I read online that we cannot reference variables from a temp table in power BI." but check the post below by SQLBI where they make references to how to use variables calculations and get data from those tables.
https://www.sqlbi.com/articles/table-and-column-references-using-dax-variables/
Regarding my second comment I was refering that you can use the new M query parameters to make a new table that picks up the slicer values filtering your data and then use that 3rd table to make your data visualization in conjunction with the slicer of the condition.
Check the blog post below:
https://blog.crossjoin.co.uk/2020/10/25/why-im-excited-about-dynamic-m-parameters-in-power-bi/