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 - 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.
Help when you know. Ask when you don't!
@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
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
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.
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!
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.
@hackfifi everythign is possible, just need bit of time to put together the solution. I will try to do it later today.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
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.
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 |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |