Forum Discussion
Dynamic Column Name
- 9 months ago
Hi Ta_Weiss,
Glad to hear you managed to resolve the dynamic column name part using Field Parameters and calculated measures that’s a smart DAX-based workaround. Regarding the Power Query step error (“Value rename operations is expected”), it usually occurs when the Table.RenameColumns syntax isn’t recognized correctly because of localization (for example, needing semicolons instead of commas).
The correct format is:Table.RenameColumns(PreviousStepName, {{"OldColumnName", NewNameVariable}})Make sure you use double braces { { } } and your regional delimiter settings match Power BI’s M language.
For your second question on parameter snapping this behaviour is expected with list-based parameters. In the latest Power BI Desktop, the What-If parameter has been renamed to Numeric range. You can create it from Modelling → New parameter → Numeric range.
Set your data type (Whole / Decimal), min, max, and increment values (e.g., 0 → 10 000 by 1). Click Create Power BI will add a parameter table, a slicer, and a measure. Place the slicer on your page. Users can now type or slide any numeric value freely (e.g., 500) without snapping to the nearest item.
This is the same functionality as the old What-If parameter, just with a new name. Microsoft documentation: https://learn.microsoft.com/en-gb/power-bi/transform-model/desktop-what-ifThank you for using the Microsoft Fabric Community Forum.
Hello Ta_Weiss.
About your first question:
Yes, you can create a column with a dynamic name in Power Query by leveraging a parameter or a variable for the current month. For example:
let
Source = ...,
CurrentMonth = Date.ToText(DateTime.LocalNow(), "MMMM"), // or a user-defined parameter
AddDynamicColumn = Table.AddColumn(Source, "Sales " & CurrentMonth, each null)
in
AddDynamicColumn
About the second:
Could you give an example to ilustrate?
Thank you Zanqueta, gonna give it a try and will update you.
This is a screenshot, it is min value set that I want to be filtered out that has been automatically set to 4995 even though I set 5000:
- Zanqueta9 months agoSuper User
Ok, Ta_Weiss.
If I undestood your screenshot, this behaviour occurs because Power BI parameters of type List of Values are designed to validate user input against the predefined list. When a user enters a value that does not exist in the list, Power BI automatically selects the closest match to maintain data integrity and prevent invalid queries.
How to avoid this behaviour: Use a parameter of type Number or Text instead of a fixed list. This allows users to enter any value without Power BI adjusting it to the nearest item.
Please, try and let me kwon if its worked