cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Automatically Aliasing Names

Hi All - So i have a table (sample below) with columns Project Names & Country. When i present/publish the dashboard, i do not want to show the "Project Names" in any of the visuals but i would like the "Alias" column to be automatically calculated with sequence numbering based on Country. I would like to create a column as "Alias" below. Thanks in advance for your support.

Project Alias.PNG

6 REPLIES 6
Highlighted
Super User II
Super User II

Re: Automatically Aliasing Names

You could use the technique explained in this post https://yodalearning.com/tutorials/learn-how-create-index-columns-using-power-query/ and add an idex column to your data.

Then you could use the number from that index column to construct the alias with the country name. The numbers in the idex would all be unique, but they would not be a count of the number of times the country was listed in the table. 

If you want to have a count of the number of times a country is listed it would be better to have a measure that filters by country and does a countrows.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Highlighted
Super User IV
Super User IV

Re: Automatically Aliasing Names

@hackfifi you can also add index column group by each country which then can give you what you are looking for but not sure for the purpose to create alias if that is important. You can surely use index option proposed by @kentyler 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper III
Helper III

Re: Automatically Aliasing Names

Thanks for your responses.
So how do i add an index group by each country?
The reason is i have around 100 projects, and if i filter to show me projects in USA and Germany, i want the visuals to show me USA 1, USA 2, Germany 1, Germany 2 etc.
I do not want the visuals to come up as USA 1, USA 2, Germany 3, Germany 4 etc.

Thanks again!

Highlighted
Helper III
Helper III

Re: Automatically Aliasing Names

I forgot to mention that i have a selection to Turn ON/OFF Aliasing using SWITCH function. So i can toggle between the two options i.e. Project Name & Alias.

Ideally, i would like the sequence number to be "calculated" based on filters.
For example, if i select to review project after 2010, i would prefer the sequence number to be reset to show USA 1, USA 2, USA 3 instead of USA 51, USA 63, USA 97 etc.

But i am not sure if that is possible.

Highlighted
Super User IV
Super User IV

Re: Automatically Aliasing Names

@hackfifi everythign is possible, just need bit of time to put together the solution. I will try to do it later today.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper III
Helper III

Re: Automatically Aliasing Names

Any Solution to my query?
@parry2k 

Cheers

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors