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,
I need help on these codes because I'm getting the error as shown from the subject. FYI. gbkmut.bdr_hfl are numeric values
CASE WHEN gbkmut.transtype IN ('N','C','P','F')
AND gbkmut.transsubtype NOT IN ('R','S')
AND gbkmut.bdr_hfl >= 0
OR gbkmut.transsubtype IN ('R','S')
AND gbkmut.bdr_hfl < 0
THEN gbkmut.bdr_hfl
ELSE NULL
END AS Debit,
CASE WHEN gbkmut.transtype IN ('N','C','P','F')
AND gbkmut.transsubtype NOT IN ('R','S')
AND gbkmut.bdr_hfl >= 0
OR gbkmut.transsubtype IN ('R','S')
AND gbkmut.bdr_hfl < 0
THEN NULL
ELSE -gbkmut.bdr_hfl
END AS Credit
Solved! Go to Solution.
Good to hear that your problem is solved!
Just add a comma behind the * and the quety will give you all the columns in the table.
Hi @tksnota ,
for your printscreen I don't see the whole SQL query but it needs to be a query that runs on its own in your SQL evironment. So it will be something like select columnA, columnB from TableX.
If your query looks correct, try running it in your SQL environment. That might give you a more meaningful error.
Good luck!
I still got the same error...
SELECT gbkmut.reknr, gbkmut.bdr_hfl
CASE WHEN gbkmut.transtype IN ('N','C','P','F')
AND gbkmut.transsubtype NOT IN ('R','S')
AND gbkmut.bdr_hfl >= 0
OR gbkmut.transsubtype IN ('R','S')
AND gbkmut.bdr_hfl < 0
THEN gbkmut.bdr_hfl
ELSE NULL
END AS Debit,
SELECT gbkmut.reknr, gbkmut.bdr_hfl
CASE WHEN gbkmut.transtype IN ('N','C','P','F')
AND gbkmut.transsubtype NOT IN ('R','S')
AND gbkmut.bdr_hfl >= 0
OR gbkmut.transsubtype IN ('R','S')
AND gbkmut.bdr_hfl < 0
THEN NULL
ELSE -gbkmut.bdr_hfl
END AS Credit
Try this:
SELECT gbkmut.reknr, gbkmut.bdr_hfl,
CASE WHEN gbkmut.transtype IN ('N','C','P','F') AND gbkmut.transsubtype NOT IN ('R','S') AND gbkmut.bdr_hfl >= 0 OR gbkmut.transsubtype IN ('R','S') AND gbkmut.bdr_hfl < 0
THEN gbkmut.bdr_hfl
ELSE NULL END AS Debit,
CASE WHEN gbkmut.transtype IN ('N','C','P','F') AND gbkmut.transsubtype NOT IN ('R','S') AND gbkmut.bdr_hfl >= 0 OR gbkmut.transsubtype IN ('R','S') AND gbkmut.bdr_hfl < 0
THEN NULL ELSE -gbkmut.bdr_hfl END AS Credit
FROM gbkmut
What I did:
* I added a comma behind gbkmut.bdr_hfl
* I removed your second select statement
* I added a from statement in which I assumed gbkmut is your table name
Hi,
It worked!
Is it possible to get the whole fields of gbkmut instead of the couple?
I used SELECT * but got the same error as shown
Good to hear that your problem is solved!
Just add a comma behind the * and the quety will give you all the columns in the table.
"601"{[Schema="dbo",Item="gbkmut"]}[Data] - Forgot to add this one
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 | |
8 | |
7 | |
6 |