cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Paulyeo11
Impactful Individual
Impactful Individual

How to re-name my Table name from TABLE to COMPETITOR ?

Hi All

 

My below expression working fine :-

_Growth Rate =
VAR competitor = SELECTEDVALUE ( 'TABLE'[COMPETITOR_D] )
VAR currentYear = SELECTEDVALUE ( 'Date'[Year] )
VAR currentAMT = SUM ( 'TABLE'[AMT REVENUE_C] )
VAR previousAMT = SUMX ( FILTER ( ALLSELECTED( 'TABLE' ), 'TABLE'[COMPETITOR_D] = competitor && RELATED ( 'Date'[Year] ) = currentYear - 1 ), 'TABLE'[AMT REVENUE_C] )
RETURN
DIVIDE ( currentAMT - previousAMT, previousAMT )
 
 
 
1 ACCEPTED SOLUTION

@Paulyeo11 

Change the variable's name competitor into __competitor (or any other different name) will solve it. It is because a variable name cannot be the same as a table name.

121702.jpg

View solution in original post

9 REPLIES 9
PhilipTreacy
Super User III
Super User III

@Paulyeo11 

Check your email.

The word Competitor you have ringed in red is the table name - the one you just renamed from Table.

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User III
Super User III

Hi @Paulyeo11 

When you change the table name (just double click the name and type in the new one) the table's name in the measure will be automatically changed to match.

However, you have a variable in your measure called competitor and this will have to be changed so it doesn't clash with the renamed table.

Regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Paulyeo11
Impactful Individual
Impactful Individual

Hi Phil

thsnk you for your explanation.

paul

amitchandak
Super User IV
Super User IV

@Paulyeo11 , Double Click on name and change. On or two Column may error.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Paulyeo11
Impactful Individual
Impactful Individual

Hi All

Thank you very much for sharing. I have try , i get error on expression.

 

Below image shown before rename :-

Paulyeo11_0-1608185197493.png

 

After i rename , i get error msg , see the red box :-

Paulyeo11_1-1608185292342.png

 

below is my PBI file :-

https://www.dropbox.com/s/tuuqhhvklvvbpgi/PBT_V01008%20How%20to%20change%20table%20name%20from%20tab...

@Paulyeo11 

Change the variable's name competitor into __competitor (or any other different name) will solve it. It is because a variable name cannot be the same as a table name.

121702.jpg

View solution in original post

Paulyeo11
Impactful Individual
Impactful Individual

Hi Jing

I have change the table name to COMP , now it work fine. But then can you pls share with me below :-

Paulyeo11_0-1608189231345.png

 

Singaravelu_R
Resolver II
Resolver II

Right click and select rename in the option or double click on the table to change the table name

NikhilKumar
Super User II
Super User II

@Paulyeo11 You can do a right click on the table and then choose Rename from the list.

Or click on the tabke name and press F2 to rename

Or double click on table name to rename.


Nikhil
Hit the Thumbs-up button if you find this informative!!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors