Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am creating a calculated table by summarizing date, country, branch and sales amount from Table Sales
Branch_Sales_calc =
var branch = 'Parameter'[Branch] -- value is from query parameter
Solved! Go to Solution.
@Anonymous Currently it is not supported to change the column name dynamically with the parameter.
As a workaround, I suggest using fixed "Sales" or "Total Sales" as the name of this column to indicate what this column's data describes. Then format the visual's title conditionally with the field 'Parameter'[Branch] to let users know which branch this data represents for.
Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
@Anonymous , I doubt you can use a slicer value or parameter in a new table creation
also try changing var like and try
var branch = max('Parameter'[Branch] )
I have tried, it does not work.
@Anonymous Currently it is not supported to change the column name dynamically with the parameter.
As a workaround, I suggest using fixed "Sales" or "Total Sales" as the name of this column to indicate what this column's data describes. Then format the visual's title conditionally with the field 'Parameter'[Branch] to let users know which branch this data represents for.
Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
Oh. You can't use a variable where "BranchName" is. Why is that needed? Why not use a fixed name that reflects what is in that column like "TotalSales"? If needed, you could add another column to your table that has the branch name on every row.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The report I want to build needs a column name on matrix table that based on user selection. That is why I need a dynamic column name
Is Parameter a text value? Or is it a 1-row/1-column table? If a table, you need to aggregate it with MIN('Parameter'[branch]) for example.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Yes, it is a 1-row/1-column table, text value, I have tried aggregation MIN butstill get the same error - Function SUMMARIZE expects a column name as argument number 4.
User | Count |
---|---|
73 | |
70 | |
38 | |
24 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
41 | |
40 |