"expression"
3 TopicsConvert String that represents duration to a Numeric Value (number of seconds) in DAX
Assuming that I have a string that contains any of the following words: Day, Days, Hour, Hours, Minute, Minutes, Second, Seconds I wanna grab the number in front of every appearing word and depending on the type of measure multiply it with the right number to get the total number of seconds. For example if I have "2 Days 3 Minutes" then the code will calculate: 2 x 86400 + 3 x 60 = 172980 Example Input Desired Outcome 2 Days 3 Minutes 1 Second 172981 1 Hour 3600 2 Hours 15 Minutes 8100 1 Day 3 Hours 1 Minute 10 Seconds 97270 There are two challenges: 1) the string might missing one of the key words. It could be a full string like the last example in the table, but also only one of the words or a combination of those. 2) Both singular and plural forms of the words appear (Day, Days etc) depending on if it is 1 or 2 or more days.Solved627Views0likes2CommentsLine-to-line amplitude
Friends good night. Help me solve an issue that I'm not able to solve. Image a table with two columns In one analysis and in the other results. For example: Analysis column - Result column Turbidity - 1.0 Color - 6.0 Ph - 7.0 Conditionivity - 147 Turbidity 1.2 Color - 6.2 Color - 6.6 Ph - 7.2 There are several mixed analyses. How would I calculate the amplitude line by line according to a filter applied in a data segmenter. Type: If I select COLOR, Bi makes an imaginary column with the color values and calculates it like this: Color - "Imaginary Table" 6.0 - null 6.2 - 0.2 (6.2-6.0) 6.6 - 0.4 (6.6-6.2) And finally, return to the average of these values (0.3)Solved483Views0likes2CommentsPick Department on the Bases of Student Selection From dropdown and Sum over All fee submitted
Hello Community, I have a scenario that to Pick Department on the Bases of Student Selection From dropdown and Sum over All fee submitted for that department. Detail 1: I have a student dropdown. (User can select 1 or more then 1 at a same time) 2: I need to pick the Department of the selected Student/Students (For Example IT, Commerace, Law etc) 3: I have to calculate the total Fee submitted for thta department. (will not consider the student but the department of that student) I need something like this Fee Submitted = VAR SelectedStudent = SELECTEDVALUE('Student'[Name]) VAR AssociatedDEPT = CALCULATE( VALUES('Student'[Department]), 'Student'[Name] IN SelectedStudent ) RETURN CALCULATE( SUM('Student'[FeeSubmitted]), 'Student'[Department] IN AssociatedDEPT Your quick response will he highly appriciated1.8KViews0likes8Comments