Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I'm trying create a column using a numeric field based on the value of a non-numeric column. I'm using An IF Statement as follows:]
@Anonymous Strange. Worked flawlessly for me. See attached PBIX below signature. You should at least get the original Hour column values. I would also recommend switching over to using a SWITCH(TRUE(),...) statement to avoid nested IF statements.
Greetings again, Greg! Was finally able to get the results that I needed. It came from a colleague where I work. First off, there were several issues with my data:
Providing the final result:
I hope this helps anyone else that may need such a solution.
Greg, thanks again for giving it a go!
Best regards,
Marty
Greetings and Happy St. Patty's Day, Greg. So I created a test data sample of my own and put it into PowerBI and was not able to get it to work. Unfortunately, I don't have the option to attach a file or I would include the .xlsx test data and .pbix file. Here's a screen shot of the data in the .xlsx file:
and a screen shot of the table in .pbix:
Associated DAX Code:
Here's the results I get:
😞
Yes, very interesting. It's not working for me at all. I also tried using SWITCH to not have to do two separate columns and IF statements, but that also didn't work. When I tried to open your file, it says I'm using an old version of Power BI and need to update. That may be the problem right there. Will update and retry and will let you know. Thanks for your help, Greg!
User | Count |
---|---|
77 | |
77 | |
68 | |
67 | |
49 |
User | Count |
---|---|
108 | |
105 | |
93 | |
83 | |
64 |