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.
Hello.
I have a problem. I want to extract information from the table into one cell. And I have errors like in this picture. The aim is to create a dynamic function to use in the column function Could you help? My primitive code is below. Thanks for your help. 🙂
(mytable as table)=>
let
#"Transform File (6)" = #"mytable"{0}[#"Transform File (6)"],
#"Demoted Headers" = Table.DemoteHeaders(#"Transform File (6)"),
#"Filtered Rows" = Table.SelectRows(#"Demoted Headers", each Text.Contains([Column1], "2c Podtrzymywanie oddychania")),
#"Counted Rows" = Table.RowCount(#"Filtered Rows")
in
#"Counted Rows"
Solved! Go to Solution.
I found solution:
(mytable as table)=>
let
Source = Excel.Workbook(mytable, null, true),
#"Demoted Headers" = Table.DemoteHeaders(mytable),
#"Changed Type" = Table.TransformColumnTypes(#"Demoted Headers",{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each #"Changed Type"{0}[Column1]),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each Text.Contains([Column1], "2a Wentylacja mechaniczna - 5 pkt. Wszystkie ")),
#"Counted Rows" = Table.RowCount(#"Filtered Rows")
in
#"Counted Rows"
I found solution:
(mytable as table)=>
let
Source = Excel.Workbook(mytable, null, true),
#"Demoted Headers" = Table.DemoteHeaders(mytable),
#"Changed Type" = Table.TransformColumnTypes(#"Demoted Headers",{{"Column1", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each #"Changed Type"{0}[Column1]),
#"Filtered Rows" = Table.SelectRows(#"Added Custom", each Text.Contains([Column1], "2a Wentylacja mechaniczna - 5 pkt. Wszystkie ")),
#"Counted Rows" = Table.RowCount(#"Filtered Rows")
in
#"Counted Rows"
For Example:
My aim is to extract one specific cell from each table in the column "Transform File (6)".
In the Column "Transform File" in the picture show this one specific cell value (instead of an error).
Hi @MattBatt - It is not clear what you are trying to achive from the information provided. I am not sure you have a valid function. I would not expect this line to work
#"Demoted Headers" = Table.DemoteHeaders(#"Transform File (6)")
because you have selected a String or Number in the previous step instead of a table.
Can you step out an example in Excel or upload an example PBIX file.
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 |
---|---|
13 | |
13 | |
11 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
7 | |
7 | |
7 |