Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All, I am n newbie to DAX, with some experience in PL/SQL, stuck at situation am unable to resolve. Appreciate any suggestion from datanuts here, let me sum-up the situation using a proxy scenario;
I have created a slicer for the user to select ACCOUNT_FACT[ACCOUNT] from TABLE(2) ACCOUNT_FACT, which is then fed into a measure AC_SELECTED = SLELECTEDVALUE (ACCOUNT_FACT[ACCOUNT]), I want to pass on this value dynamically as filter criteria to create a new TABLE(3) SALES_REP from existing TABLE(1) SALES_FACT
SALES_REP =
CALCULATETABLE(
DISTINCT (SELECTCOLUMNS(SALES_FACT,”SALE_GUYS”,SALES_FACT[SALES_REP]
FILTER(SALES_FACT,
SALES[ACCOUNT] = AC_SELECTED
)
However this doesn’t seem to work, I tried variable also. What I have realized in the process is that CALCULATETABLE function will not work using slicer values, as the tables are generated at the time of model load and hence any slicing post that will not dynamically refresh dependent tables. Is theer a work-around aproach ?
Solved! Go to Solution.
@Anonymous -
It is true that Calculated Tables are created at refresh time, while Measures are calculated at query time.
It seems that you are trying to filter on a column - I think you need an Account dimension table. You can create a relationship to each of your fact tables and use the Account from the new dimension table to filter the fact tables.
Hope this helps,
Nathan
@Anonymous -
It is true that Calculated Tables are created at refresh time, while Measures are calculated at query time.
It seems that you are trying to filter on a column - I think you need an Account dimension table. You can create a relationship to each of your fact tables and use the Account from the new dimension table to filter the fact tables.
Hope this helps,
Nathan
Could I possibly get a little more context here? I have the exact same issue.
@Anonymous
Works like magic! Thanks Nathan, that was very helpful, not just in getting around the problem, but also understanding how relationship can be configured to create a background for developing complex dependent functionalities. Cheers!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |