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.
I have a table sales:
SalesID. Date. Geography 1. 2020-01. Italy 1. 2020-01. France 1. 2020-01. UK 2. 2020-02. Italy 2. 2002-02. Canada 3. 2002-08. France
Within powerqueryM, I' able to pivot the table. Now the result:
SalesID. Date. Geography1 Geography2. Geography3 1. 2020-01. Italy. France. Uk 2. 2020-02. Italy. Canada. Null 3. 2020-08. France
How can I add dynamically the Geography 1, Geography 2.. in a matrix. The number of columns Geography is unlimited and unexpected. For example, if I'll have Geography 4, how to add it dynamically in the matrix header?
Solved! Go to Solution.
Hi @Anonymous ,
You do not need to have the table pivoted if you had a column with the Geopgraphy level that you want maknig a count of the rows this will give your the Geography level 1, 2, and so on.
Using this post you can create an addiotional column with the Index and then geography:
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
Now just use that to make it varialbe:
See file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi, @Anonymous
It seems that @MFelix 's solution can meet your requirement.
If so, please accept it as soultion to close this thread.
More people will learn new things here. If you haven't, please feel free to ask.
Best Regards,
Community Support Team _ Eason
Hi @Anonymous ,
You do not need to have the table pivoted if you had a column with the Geopgraphy level that you want maknig a count of the rows this will give your the Geography level 1, 2, and so on.
Using this post you can create an addiotional column with the Index and then geography:
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
Now just use that to make it varialbe:
See file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |