dax query
7 TopicsStripping out the query string in a URL returning blank
Hello, I am trying to strip out everything including and after the ? from my url [page_location] to report on page usage, I am also stripping out my own website address to shorten the result. eg in the below random website example url https://ortc.com.au/products/logo-quarter-zip-charcoal?variant=41124690722934 all that would be left is /products/logo-quarter-zip-charcoal My query, which is a result partly of these forums and our chatgpt friend, is below but keeps returning blanks for every result. If anyone has any ideas I would be extremely grateful! Page Path = VAR Destringed_Page_Loc = IF( CONTAINSSTRING(Query1[page_location], "?"), LEFT(Query1[page_location], SEARCH("?", Query1[page_location]) - 1), Query1[page_location] ) RETURN SUBSTITUTE(Destringed_Page_Loc, "https://www.myurl.com.au", "")Solved804Views2likes1CommentDAX query with date parameter
Using Report Builder, I created a dataset that contains a date parameter. I need to add an order by to the DAX Query but am unsure of the correct syntax. Example is below. I need to order by 'Task'[ActivityDate] DESC DEFINE VAR vFromTaskActivityDateHierarchy1 = IF(PATHLENGTH(@FromTaskActivityDateHierarchy) = 1, IF(@FromTaskActivityDateHierarchy <> "", @FromTaskActivityDateHierarchy, BLANK()), IF(PATHITEM(@FromTaskActivityDateHierarchy, 2) <> "", PATHITEM(@FromTaskActivityDateHierarchy, 2), BLANK())) VAR vFromTaskActivityDateHierarchy1ALL = PATHLENGTH(@FromTaskActivityDateHierarchy) > 1 && PATHITEM(@FromTaskActivityDateHierarchy, 1, 1) < 1 VAR vToTaskActivityDateHierarchy1 = IF(PATHLENGTH(@ToTaskActivityDateHierarchy) = 1, IF(@ToTaskActivityDateHierarchy <> "", @ToTaskActivityDateHierarchy, BLANK()), IF(PATHITEM(@ToTaskActivityDateHierarchy, 2) <> "", PATHITEM(@ToTaskActivityDateHierarchy, 2), BLANK())) VAR vToTaskActivityDateHierarchy1ALL = PATHLENGTH(@ToTaskActivityDateHierarchy) > 1 && PATHITEM(@ToTaskActivityDateHierarchy, 1, 1) < 1 EVALUATE SUMMARIZECOLUMNS('Task'[WhatId], 'Task'[Status], 'Task'[Description], 'Task'[ActivityDate], FILTER(VALUES('Task'[ActivityDate]), (vFromTaskActivityDateHierarchy1ALL || 'Task'[ActivityDate] >= DATEVALUE(vFromTaskActivityDateHierarchy1) + TIMEVALUE(vFromTaskActivityDateHierarchy1)) && (vToTaskActivityDateHierarchy1ALL || 'Task'[ActivityDate] <= DATEVALUE(vToTaskActivityDateHierarchy1) + TIMEVALUE(vToTaskActivityDateHierarchy1)))) Any assistance is appreciated.753Views0likes2CommentsDAX QUERY PREVIOUS MONTH
How to write DAX query to return previous month? for example Current month is November I want a record for previous Month October? Here is my DAX query EVALUATE SUMMARIZECOLUMNS( Dates[YYYY-MM], Dates[Mth Year], \Dates[Default Start Date] ) ORDER BY Dates[YYYY-MM] DESC, Dates[Default Start Date] DESCSolved1.5KViews0likes1CommentHow to exclude one field from summarize columns but still include it in the query
Hi, I had to introduce the field [PlannedMigrationDay] in my query for the paginated report for the sole purpose of filtering the paginated report. This is the query: /* START QUERY BUILDER */ EVALUATE SUMMARIZECOLUMNS( UserResponse[Batch], UserResponse[Response], UserResponse[PlannedMigrationDay], KEEPFILTERS( TREATAS( {"2"}, UserResponse[TenantID] )), KEEPFILTERS( TREATAS( {"4"}, UserResponse[QuestionID] )), "Responses", [Responses], "Responses %", [Responses %], "T-14", [T-14] ) /* END QUERY BUILDER */ Now I have one problem: when I have two different migration dates, my results are summarized by the date of migration whereas before they were aggregated by distinct values. I don't want my results to be aggregated by [PlannedMigrationDay]. How can I modify the query to avoid that, but still have that field in the dataset of my paginated report? Thanks in advance for the help! ~AlienvolmSolved3.7KViews0likes4CommentsDAX expression using specific field
Hi Everyone, Please help me to write expression in DAX. My current expression is Sum( Value) . I want to display the value based on specific field Response Type. For ex: 1.If Responsetype is ###,###,###,##0.0% then value would be 104,336.8% 2. If Responsetype is ###,###,###,##0 then Value is 10,972 (without percentage) Response Type ###,###,###,##0 ###,###,###,##0% ###,###,###,##0.0 ###,###,###,##0.0% ###,###,###,##0.00 ###,###,###,##0.00% $###,###,###,##0 $###,###,###,##0.00 Thanks in advanceSolved1.6KViews0likes4CommentsDax Query
Hi, I am faceing one issue with dax query which is written in DAX Query application. dax query is - EVALUATE ADDCOLUMNS ( SUMMARIZECOLUMNS ( 'Dim MWBEProgram'[MWBEProgramName], FILTER ( 'Fact Contract', 'Fact Contract'[MWBEProgramID] <> BLANK () ), FILTER ( 'Fact Contract', 'Fact Contract'[ContractNumber] = "1234" ) ) , "STATUS", IF ( 'Dim MWBEProgram'[MWBEProgramName] = "Non M/WBE", "NON M/WBE", "M/WBE" ) ) So, getting output like this: Is it possible to get only 'STATUS' Column?1.4KViews0likes5CommentsDAX Query
Hi, We have Power BI Report Server (May 2019) edition Power BI is connected with datasource SSAS (COnnect Live Option) - we understand that edit queries (Power query) gets disabled -- So group by option cant be used Can u please help me out to write DAX measures to achieve the following (The tables are already joined in SSAS) select B.type, C.category, sum(sales_amount) from fact A, storedim B, categorydim C where A.store_wid = B.row_wid and A.category_wid = C.row_wid group by B.type, C.category,Solved1.3KViews0likes3Comments