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.
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.
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.
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.
It’s time for another PBI Community recap!
Visit our Community Blog for articles, guides, and information created by fellow community members.
Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.
Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!