March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
This is really a brain cramp and pretty embarrassing to be honest. I get athe error "The syntax for 'RESULT' is incorrect" when attempting to calc a column for the code below. I'm trying to do the snippet shown at the end...which gives the error---and so I whittled it down and down and down to the following which ALSO gives the error, so I clearly don't understand the issue. (This is a calculated column in the same table as [Bed Size]!)
CohortForPerformance =
VAR SizeCategOfFacil = MeasureReptRecNoProviders[Bed Size]
RESULT
SizeCategOfFacil
----And here's the thing I'm trying to do....which is an interim calc for other stuff. Any help would be great!
CohortForPerformance = VAR SizeCategOfFacil = MeasureReptRecNoProviders[Bed Size] VAR SizeID = Switch ( TRUE(), SEARCH("400 and over",SizeCategOfFacil,1,0)<>0,"400+", SEARCH("250 to 399",SizeCategOfFacil,1,0)<>0,"250 to 399", SEARCH("100 to 249",SizeCategOfFacil,1,0)<>0,"100 to 249", SEARCH("26 to 99",SizeCategOfFacil,1,0)<>0,"26 to 99", SEARCH("25 and under",SizeCategOfFacil,1,0)<>0,"25 and under", "") RESULT CONCATENATE("Acute ",SizeID)
Solved! Go to Solution.
Bwahahahahahahahaha.....oh, that's beautiful. Yes, I'm going to get on my bike and just pedal. To much bi makes for too little pi (personal intelligence) .
Well, it isn't the first time and won't be the last time it happens, but I SURE hope I'm not alone on this.
@Sean PS: the nearest body of water is Cape Cod bay--1 mi. Tom
@ThomasDay Have you tried the Power Pivot Utilities Add-In => http://www.sqlbi.com/tools/power-pivot-utilities/
Its for Excel but there are very helpful features for your Power Pivot Data Models built in Excel.
There's a List Measures button => creates a New Excel Sheet and a Table with ALL your Measures => amazing time saver!!!
It would be great if we can get this in PBI?
Here's a review by @MattAllington => http://exceleratorbi.com.au/fabulous-new-excel-add-power-pivot/
people who may also find it useful @ImkeF @kcantor @heathernicole @Seth_C_Bauer
very usefel. fortunately DAX Studio can do much of it as well: http://exceleratorbi.com.au/getting-started-dax-studio/
this works with pbi ☺
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hey @Sean Just got back from that bike ride you prescribed 🙂
These utilities look fabulous...though regrettably I am entirely Powerbi desktop or .com so can't take advantage of them. Oh well. It's really really useful to have all of those things. I take screenshots of my relationships so that when I need to rebuild a table (delete/redo sort of thing) I can get the relationships right given the junk that auto process generates. (I suppose I should figure out how to turn that off.)
Tom
@ThomasDay Yes! You were approaching Dangerously Low Levels of PI
@ImkeF I do use Dax Studio - however I can't get it to export the Measures to an Excel file - only txt and csv???
I don't see the options that Matt describes on his page
All I get is this...
UPDATE: Happy to report that it seems now the option is showing up!!! @ThomasDay you should give this a try!
@Sean yes indeed. I've used DAX studios as a barely functional rookie to give me documentation around measures. I was unaware that it could connect to a .pbix file, which it does famously. That's awesome. SQL isn't something I know, but the built in's do a few really useful things....thanks for the tip and @ImkeF, as always, thanks for the DAX studios nudge.
@Sean is correct! That is a fantastic utility.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |