Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
9 | |
7 |