cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ppgandhi11 Member
Member

how to find values of calculated table?

Hi,

 

I have created below measure (I tried with new column also but did not work).

 

TESTMEASURE =
var y = CALCULATETABLE(ALLSELECTED(Query1[Specialty]), FILTER(query2, Query2[PROVIDER_ID] = "123456"))
return COUNTROWS(y)

 

Basically, this works and returns the number of rows returned for calculated table. I expect different outcome (# returned).

 

I want to see what values are there in the table. How can I find the values of calcuated table?

 

Please help. Thanks!

 

Prashant-

1 ACCEPTED SOLUTION

Accepted Solutions
AkhilAshok Established Member
Established Member

Re: how to find values of calculated table?

You can go to Modelling -> New Table, and give:

Table = CALCULATETABLE(ALLSELECTED(Query1[Specialty]), FILTER(query2, Query2[PROVIDER_ID] = "123456"))

 

This will give u the output of that table which you used inside the measure. But, the Filter Context from the visual won't be available here. If you want to simulate the Fiter Context in your Chart/Table, you have to enhace the DAX Table function to include all required filters.

 

Once your testing is done, you can Delete this table.

4 REPLIES 4
AkhilAshok Established Member
Established Member

Re: how to find values of calculated table?

For troubleshooting best tool to use is DAX Studio. You can write you own DAX Queries and experiment.

 

Another option is to try Create Table option in Power BI and enter the Table function.

ppgandhi11 Member
Member

Re: how to find values of calculated table?

Thanks for your response. I am new to Power BI so don't know a whole lot.

 

So are you saying that in this approach i can see # of records in the table but cant see the values of each record? That seems very odd. This is a dynamically created table as i understand, so how create table would help? can you give me a pointer? I don't have DAX studio.

AkhilAshok Established Member
Established Member

Re: how to find values of calculated table?

You can go to Modelling -> New Table, and give:

Table = CALCULATETABLE(ALLSELECTED(Query1[Specialty]), FILTER(query2, Query2[PROVIDER_ID] = "123456"))

 

This will give u the output of that table which you used inside the measure. But, the Filter Context from the visual won't be available here. If you want to simulate the Fiter Context in your Chart/Table, you have to enhace the DAX Table function to include all required filters.

 

Once your testing is done, you can Delete this table.

Highlighted
ppgandhi11 Member
Member

Re: how to find values of calculated table?

I found the solution using the joins, but marking this as accepted solution since it may help someone else. Thanks!