Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Folks!!
I have a table with one column say Country and it has just one value (always) say INDIA, though the name name of the country can be changes but number of rows remains 1.
I just want to capture this value in Text variable in Power BI M Query.
Please suggest!!
Thanks
Amit
Solved! Go to Solution.
You can use Table{0}[Column] to refer to it (use your table and column names).
You can put it in a variable with an assignment e.g.
p = TableA{0}[Column1]
Hi @HotChilli ,
Thanks for your answer, it works well.
p = TableA{0}[Column1]
However, i too find some other way out to achieve the goal, below is the code.
varName=Table.FirstValue(TableName)
This will give first column of first row.
Thanks
Amit Srivastava
You can use Table{0}[Column] to refer to it (use your table and column names).
You can put it in a variable with an assignment e.g.
p = TableA{0}[Column1]
Hi @HotChilli ,
Thanks for your answer, it works well.
p = TableA{0}[Column1]
However, i too find some other way out to achieve the goal, below is the code.
varName=Table.FirstValue(TableName)
This will give first column of first row.
Thanks
Amit Srivastava
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
6 | |
6 | |
5 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |