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 Community (me again);
I build a powerquery that works (80%) so I´m asking for help to made it to work 100%
Have a table with codes and I need to create a new column based on these codes.
Code below:
= Table.AddColumn(#"dbo_BI-Despesas", "Custom",
each if [nCodGrPg] = 1003 then "Despesas"
else if [nCodGrPg] = 12 then "Investimentos"
else if [nCodGrPg] = 1000 or [nCodGrPg] = 1001 or [nCodGrPg] = 1002 then "Gastos"
// (This line isn´t working, it doesn´t filter the data as expected, should ALL except the filtered values "<>" , what I´m doing wrong"?) // else if [nCodClPg] <> 999 or [nCodClPg] <> 201 and [nCodGrPg] <> 1000 or [nCodGrPg] <> 1001 or [nCodGrPg] <> 1002 or [nCodGrPg] <> 1003 or [nCodGrPg] <> 21 or [nCodGrPg] <> 999 or [nCodGrPg] <> 201 then "Custos"
else if [nCodClPg] <> 999 then "Despesas-Geral-999"
else if [nCodClPg] <> 201 then "Despesas-Geral-201"
else "Null")
Thanks in Advance
Solved! Go to Solution.
@Mahesh0016 this link have sample data https://we.tl/t-LS6g2O4qhg, you will see in the "classificação" column four types, but the filter for "Custos" isn´t working as expected, another two examples below which are working:
DAX:
fell free to ask if you still have question, thanks in advance!
@Mahesh0016 this link have sample data https://we.tl/t-LS6g2O4qhg, you will see in the "classificação" column four types, but the filter for "Custos" isn´t working as expected, another two examples below which are working:
DAX:
fell free to ask if you still have question, thanks in advance!
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 |
---|---|
11 | |
10 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |