@daxhelp
82 TopicsDAX Switch & nested IF
https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-challenge-nested-if-or-switch-is-not-working/m-p/4792912#M183444 i can't belive there is no solution for this, i need a simple dax measure IF( ISINSCOPE( HIER[LEVEL_7_DESC] ), 17, IF( ISINSCOPE( HIER[LEVEL_6_DESC] ), 16, IF( ISINSCOPE( HIER[LEVEL_5_DESC] ), 15 ) ) ) this doesn't work because if i change the order of column in the visual then the higher or the first condtition will always be the only one is true returning this value only?!!Solved2KViews0likes8CommentsTotal Customers (end of month)
Hi Everyone, Could you help me configure this? create a DAX measure that calculate the Total Customers (end of month) based on total customers at eriod of time and cancelled customers. Note: all metrics was calculated by measures. pbidaxhelp daxdax dax daxdaxdaxSolved2.5KViews0likes13CommentsShowing Only Total Labels for Stacked Bar Chart with Conditional DAX Logic
Hello, If I select single selection from slicer (type-1/type-2/type-3) then need to see the data value like below. If I select single selection from slicer (type-12 only) which is a stacked chart, combination of type-1 and type-2. If I select multiple selection from slicer then no individual data label will come (will show only total). I'm currently using a DAX measure in Power BI to hide data labels when selecting type-1 and type-2 (at the same time) from a slicer. But, it is not working. It is showing (individual data labels, and total data labels both) Data Label = VAR SelectedCategories = VALUES(type_sort[type]) -- Get all selected categories VAR ConcatenatedSelection = CONCATENATEX(SelectedCategories, [type], ", ") RETURN IF( ConcatenatedSelection = "type-1, type-2", "", -- Hide the data label [describeMeasure] -- Otherwise, show the data label ) As I mentioned before, I need to turn on total labels on to see the total for the type-12 (when selecting it only). I also need to turned on the data labels to see data point when selecting a single selection of type-1/type-2/type-3. If anyone has suggestions for improving the DAX or alternative approaches to achieve this behavior, I’d really appreciate it. You can find the Power BI file here: [link]Solved1.7KViews0likes7CommentsDAX rolling churn for the month (MTD)
Hi guys, I’d like to ask for your assistance in getting the correct output. The goal is to calculate a rolling daily count of churned services. Appreciate your help in advance. SUMMARIZE( ADDCOLUMNS( churn_services, "Date", churn_services[disconnectiondate], "Customer Type", churn_services[customertypename], "Measures", "MTD Churn", "Product Category", churn_services[productcategoryname], "UB Group", churn_services[groupname], "Total Churn Services", CALCULATE( DISTINCTCOUNT(churn_services[serviceid]), FILTER( ALLEXCEPT( churn_services, churn_services[customertypename], churn_services[productcategoryname], churn_services[productitemname], churn_services[groupname] ), churn_services[disconnectiondate] <= MAX(churn_services[disconnectiondate]) && MONTH(churn_services[disconnectiondate]) = MONTH(TODAY()) && YEAR(churn_services[disconnectiondate]) = YEAR(TODAY()) ) ) ), [Date], [Measures], [Customer Type],Solved1.9KViews1like10CommentsRunning Total and shifting the date back by one month.
Hi, I’d like to seek your help to fix my issue in DAX measure with calculating the Running total with shifting date back by month. This is the DAX code for Running total (BX column) MEASURE_Services_at_Start_of_Period = CALCULATE( DISTINCTCOUNT(crm[serviceid]), FILTER( ALLEXCEPT( crm, crm[groupname], LKP_group[Group], crm[productcategoryname], LKP_productcategory[Product Category], crm[customertypename], crm[disconnectiondate], LKP_calendar[Date] ), crm[activationdate] <= MAX(crm[activationdate]) ) ) And this is the DAX code for Running total, but shifting the date back by month (BY column) MEASURE_Services_at_Start_of_Period_Last_Month = VAR temp1 = CALCULATE( DISTINCTCOUNT(crm[serviceid]), DATEADD(LKP_calendar[Date], -1, MONTH)) VAR temp2 = CALCULATE( temp1, FILTER( ALLEXCEPT( crm, crm[groupname], LKP_ubgroup[UB Group], crm[productcategoryname], LKP_productcategory[Product Category], crm[customertypename], crm[disconnectiondate], LKP_calendar[Date] ), crm[activationdate] <= MAX(crm[ubactivationdate]) ) ) RETURN temp2 However, this is the outcome I received.Solved769Views0likes2CommentsList of values with filter, kindly help me!
Hi Team, Kindly help me for filter visual. I have the 'Data' column and categories columns. like below snapshot format. we required filter, If I select categories col of 'a' then "a" related all data shown like below snapshot. If select 'b' then "b" related of all data required. How to it in DAX with this? Note:- In power query it is possible, by splitting muliple cols and we will do it. but have performacne impact, kindly help me to it using DAX?Solved750Views0likes4CommentsDax measure query required of below shared expressions. kindly help me!
Hi Team, Good Afternoon! Kindly help me for DAX measure query of below 2 expressions. 1. Sum([ABC] * [DEF] / 100) 2. Sum((case when [AAA]>1 then [AAA] / 100 else [AAA] end) * [XYZ]) / Sum((case when [BBB]>1 then [BBB] / 100 else [BBB] end) * [XYZ]) I required measures due to need to call this final values in the card visual. please help me.Solved1.4KViews4likes5CommentsCalculate Weekdays between dates
I have created a DAX formula to calculate weekdays, excluding Sundays, Saturdays, and holidays. It is working fine for all the rows. However, I'm not sure why, but it is causing an issue for one specific record. CALCULATE ( COUNTROWS ( 'Order create date' ), FILTER ( 'Order create date', WEEKDAY ( 'Order create date'[Order create date], 2 ) < 6 && 'Order create date'[Is holiday] =0 ), DATESBETWEEN ( 'Order create date'[Order create date], 'Sales order line'[Created date (weekday)] + 1, 'Sales order line'[Ship date requested] ) )Solved544Views0likes1CommentRank a measure
I have - a dimension table 'dim_Date' with column 'Date' - a dimension table 'dim_Customers' with columns 'Customer ID', 'Customer Name' - a fact table 'fact_Sales' with columns 'Customer ID', 'Date', 'Type', 'Sales'. I want to create a measure to rank Customers based of their Sum of Sales over a time period which is filtered in a slicer of 'dim_Date'['Date']. This measure will be used later in a visual graph with visual filter on 'fact_Sales'['Type']. This is my DAX query for the measure: Rank = RANKX(ALLSELECTED('fact_Sales'),CALCULATE(SUM('fact_Sales'[Sales]),ALLEXCEPT('fact_Sales','fact_Sales'[Customer ID])),,DESC,Dense) But the function ALLACCEPT in my measure ignore filters of 'dim_Date'['Date'] and 'fact_Sales'['Type']. Could you help me with changing the query so that it doesn't ignore filters of 'dim_Date'['Date'] and 'fact_Sales'['Type'], please? Thank you 🙂Solved904Views0likes4Comments