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 few columns in PQ editor. I would need to write function into PQ:
If column "E" => 5 milions, stay in the report
If column "E" <5 milions, then stay in the report only if suma (G:L) >500.000
So for example, all the lines from 2-20 should be visible and also line 21 and 23.
How to use function? Or is it possible to use function in the filter?
Many thanks for any advice.
Solved! Go to Solution.
hello, @FValluch
Table.SelectRows(your_table, (x) => x[E] >= 5000000 or List.Sum(Record.FieldValues(Record.SelectFields(x, {"G", "H", "I", "J", "K", "L"}))) > 500000)
and replace all chars with actual column names.
There is a function in XLS, which is actualy working:
=KDYŽ([@Celkem]>=5000000;"REPORT";KDYŽ([@Suma]>=500000;"Report";NEPRAVDA))
hello, @FValluch
Table.SelectRows(your_table, (x) => x[E] >= 5000000 or List.Sum(Record.FieldValues(Record.SelectFields(x, {"G", "H", "I", "J", "K", "L"}))) > 500000)
and replace all chars with actual column names.
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 |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |