Forum Discussion
mh0916
9 years agoNew Member
Dynamic reference instead of set text
Hello, I am new to PowerBI and need some help please... I am looking to dynamically refer to StyleCode column in my CALCULATETABLE formula, instead of only having set text of "FAR2I10". Can someo...
v-sihou-msft
9 years agoMicrosoft Employee
In Power BI Desktop, we can't use Query Parameter in DAX formula.
MattAllington is correct. In this scenario, it's not a good practice to hard code values for so many fields in your calculations. It's better to put those data fields into Slicer. Your measure will take your selection in slicer to calculate the corresponding result.
Regards,
mh0916
9 years agoNew Member
Thanks all,
Can you set a slicer to auto adjust to always filter the last 6 months worth of dates or do you have to manually do this?
Much appreciated!
- v-sihou-msft9 years agoMicrosoft Employee
You may create a time period slicer in your report. Please refer to: POWER BI – TIME PERIOD SLICER FOR LAST 7 DAYS,LAST 30 DAYS.
Regards,