syntax
7 TopicsIf Command Issues.... Bit of a newbie
Hi - I have a single value card in a report - if I have multiple orders when I select a customer it by default displays the first one. I'd like the value on that card to count the number of orders and if it's greater than 1 to display 'Multiple orders' and if there is only 1 order matching the filters to display the order number. I have Measure=IF(COUNT(Order[OrderNumber])>1, "Multiple Orders", Order[OrderNumber] ) It doesnt work and I can see the only options seem to be measures not dimensions - is there a way to force it to select the measure value? ThanksSolved675Views0likes3CommentsSyntax disappears when writing DAX
Hi All, I've noticed that when I write DAX the pop-up showing the syntax will disappear if I step out of the function, and then won't re-appear. Is there a setting or shortcut key that will enable me to see the syntax for a function at any given time? ThanksSolved832Views0likes4CommentsIf statement gives error token leftbracket expected
Im getting a token leftBracket expected error: I'm trying to add a "0" to the end of the field LotTxt if the length of the text is not 10. Column = IF(LEN(Grading_data[lotTxt]) =10, grading_data[[LotTxt], CONCATENATE(grading_data[LotTxt]),"0")Solved1.1KViews0likes3CommentsSyntax Issues with API Call
Can anyone identify what is wrong with this function? I know a "Token Comma Expected" however, I cannot figure out to fix this problem. The bolded/underlined phrases below are whats giving me this problem: Source = Csv.Document(Web.Contents("https://ClinicalTrials.gov/api/query/study_fields?&fields=NCTId,LeadSponsorName,Phase,BriefTitle,Org...max_rnk=" & Number.ToText( limit )"&fmt=csv&min_rnk=" & Number.ToText( offset )),[Delimiter=",", Columns=7, Encoding=65001, QuoteStyle=QuoteStyle.None]),Solved594Views0likes1CommentDividing and applying the value to another
I'm new to Power BI and haven't had any training so apolygises if the answer is obvious. I have a set of data Site Total Miles Site1 1000 Site2 2000 Site3 3000 Site4 5000 The total for Site4 needs to be split between the other 3 sites. The data is being pulled from a SharePoint list so needs to be dynamic as it will constantly be updating as well as being able to be shown on different visulations by site and also by user. I know how I'd do it in SQL but no idea what DAX syntax I need to use. Thanks in advance704Views0likes2CommentsWhat's wrong with my syntax?
Hi all, I am looking to create a measure that will take a count of cases sold and then return the average of it, however for the life of me I cannot figure out why my syntax is off? I tried using DAX formatter and that states I am missing an equal sign after average? VAR MaxDate = MAX ( 'Calendar'[Date] ) VAR MinDate = MIN ( 'Calendar'[Date] ) VAR SoldCaseIntCount = CALCULATE(COUNT ('Cases'[SoldCaseInt])) RETURN CALCULATE (AVERAGE (SoldCaseIntCount), FILTER (ALLEXCEPT ('Cases', 'Cases'[Settlement Officer]), 'Cases'[Sale Date] >= MinDate && 'Cases'[Sale Date] <= MaxDate) ) Let me know what you think...1.3KViews0likes4Comments