help needed
49 TopicsChange Month_INT slicer to Month_Name slicer, not yielding to the right result. Help Needed!!
I have two Data Tables: 1. SOB_Month_WD YEAR MONTH WORKDAY Month_Name Year_part 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 2024 1 01 Jan '24 The above is a snipet of the table, likewise there are rows for all the month and WORKDAY (1 to 27) and Years 2024 and 2025 2. The SOB_QTD table SBG CALC_RATE_QTD YEAR MONTH FISCAL_WEEK_IN_YEAR WORKDAY DATE Requested Delivery Date TODAYQUERYDATE Data_Source_Name Month_Name_QTD AB 100 2025 2 07 15 14-02-2025 03-03-1973 2025-04-27T09:10:26.8340000 Billing Feb AB 0 2024 9 39 24 26-09-2024 03-03-1973 2025-04-27T09:10:26.8340000 Orders Sep AB 0 2025 4 17 26 26-04-2025 31-03-2026 2025-04-27T09:10:26.8340000 Backlog Apr AB 0 2024 8 34 20 24-08-2024 03-03-1973 2025-04-27T09:10:26.8340000 Billing Aug AB -140 2024 2 08 16 19-02-2024 03-03-1973 2025-04-27T09:10:26.8340000 Billing Feb AB -170 2024 6 24 13 12-06-2024 03-03-1973 2025-04-27T09:10:26.8340000 Billing Jun AB -200 2024 4 17 19 25-04-2024 03-03-1973 2025-04-27T09:10:26.8340000 Orders Apr AB -230 2024 2 05 05 03-02-2024 03-03-1973 2025-04-27T09:10:26.8340000 Billing Feb AB -260 2024 5 19 06 06-05-2024 03-03-1973 2025-04-27T09:10:26.8340000 Billing May AB -290 2025 4 16 14 17-04-2025 03-03-1973 2025-04-27T09:10:26.8340000 Billing Apr The table above is a snipet of a larger dataset, I have included and masked necessary fields for compliance. On both the tables I have performed few DAX columns as follows: a) Calc WD Null Include = IF ( ISBLANK ( SOB_Month_WD[WORKDAY] ), IF ( SOB_Month_WD[MONTH_INT] IN { 3, 6, 9, 12 }, "25", IF ( SOB_Month_WD[MONTH_INT] IN { 1, 2, 4, 5, 7, 8, 10, 11 }, "20", BLANK() // Return blank if none of the conditions are met ) ), IF ( SOB_Month_WD[WORKDAY] IN { "00", "0"}, "01", SOB_Month_WD[WORKDAY] ) ) b) MONTH_INT = INT(SOB_Month_WD[MONTH]) Both the tables are have a relationship LinkKey = CONCATENATE(SOB_Month_WD[MONTH],SOB_Month_WD[Calc WD Null Include]) Cardinality: Many to Many; cross-filter direction: both Main Ask: QTDCY = VAR SELECTEDMONTH = MAX(SOB_Month_WD[MONTH_INT]) VAR QUARTERSTART = INT((SELECTEDMONTH -1)/3)*3+1 VAR CURRENTYEAR = YEAR(TODAY()) var selectedwd = SELECTEDVALUE(SOB_Month_WD[Calc WD Null Include]) RETURN CALCULATE([CALC_RATE_QTD], SOB_Month_WD[MONTH_INT] >= QUARTERSTART, YEAR(SOB_QTD[EXAMPLE_DATE_QTD]) = CURRENTYEAR, ( ABS(SOB_Month_WD[MONTH_INT] < SELECTEDMONTH || SOB_Month_WD[MONTH_INT] = SELECTEDMONTH && SOB_Month_WD[Calc WD Null Include] <= selectedwd) ) ) The above DAX measure gives me the right results when I use Month_INT and Calc WD Null Include as Slicers, I need the same results for Calc WD Null Include and Month_Name as slicers. Requesting help.Solved780Views0likes5CommentsRequest for Best-Practice-Approach, filtering complete page / report based on edited Measure
Hello there, I would like to comfort my customer with the following functionality: He should beable to edit a Measure called "PresentationDate" either hardcoded or with slicer. On that date a meeting takes place to show figures actual status vs 2 month before. The plan is to let him edit the measure (e.g. May, 11th 2025 = 11.05.2025 ) and all filters / slicers on the page(s)/ the report will addjust correctly based on that date. Do you have or know any sources handling that kind of functionality / approach which you can share? Thank you very much, have a nice easter weekend. ThomasSolved777Views0likes2CommentsDate Table 12 week period
I have a Date Table which in the 12 Week Period Column creates a new period for every 12 weeks as per the column highlighted. What the 12 Weeks Period is doing through is going back to 1 at the beginning of the new year so for Date 01 January 2024 the 12 Weeks Period has gone back to 1 but there are not 12 weeks in Period 5. How do I get the column so it just rolls on without returning back to 1 for a new year? danextian Anonymous Anonymous tamerj1Solved2KViews0likes11CommentsMeasure for colouring columns on a higher aggregation level than detailed data
Hi there I kindly request your help/hints on the follwing, because I am stuck somwhere in between... I need to color a column chart based on the average out of X Months, whereas No of months is from a relative date slicer The data are weekly based (Date of Sunday) and is counting number of contracts: MyMeasure = Sum( MyTable[NoOfContracts] ) Using my datetable I am visualising MyMeasure in a columnchart I wrote a measure to get the average per No of selected Months: MyMonthlyAverage = AVERAGEX ( VALUES( calendar[MonthYear]), MyMeasure ) Based on the relation between MyMeasure and MyMonthlyAverage I want to decide the color of the column, "Geen" for above, "Red" for below MyMonthlyAverage. Unfortunateley it seems that the number per Month (MyMeasure) is not divided by no of months but by the number of Sunday-dates in the selected period (e.g. MyMonthlyNoOfContracts / No of Sunday-Dates (52) and not MyMonthlyNoOfContracts / No of Months selected (12)) MyColumnColor = var check = [MyMeasure] var limit = [MyMonthlyAverage] return SWITCH( TRUE(), check < limit, "Red", "Green") Aways "Green" gets returned and so are the columns Question: What is the Syntax to write a correct and proper MyMonthlyNumberOfContracts? Appreciating your Input thx in advance Thomas566Views0likes2CommentsIssue with SELECTEDVALUE function when used with CALCULATETABLE in DAX
Hello, I am currently working on a report where I've dedicated a page to individual companies. Users navigate to this page via "drill through" from another page. On this particular page, I would like to see other companies that are within the same industry as the company in question. With that aim, I have constructed the following DAX formula: SummarizeTable = VAR CurrentIndustry = SELECTEDVALUE('Account Meta Data'[Industry]) VAR CompanyList = CALCULATETABLE( VALUES('Account Meta Data'[DatabaseName]), 'Account Meta Data'[Industry] = CurrentIndustry ) Return CompanyList However, the CompanyList produced doesn't align with my expectation. It seems to comprise of companies which lack industry definitions in my Company Meta Table. Although I have tested the CurrentIndustry = SELECTEDVALUE('Account Meta Data'[Industry]) measure separately and confirmed it produces the correct value, it doesn't seem to function as intended within the CALCULATETABLE function. When I replace CurrentIndustry with a specific industry value (for example, "Agriculture"), the list is generated correctly. Could someone kindly help me understand what might be wrong? Any assistance would be greatly appreciated! Best regards, Brenda835Views0likes3CommentsHelp calculating number of occurrences of all values, and then summing the value of all occurrences
Hi, I would really appriciate any help on how to write a measure to first count the occurance of all differente values in a column, and then sum the occurance of each different value togeter. Country: USA Finland Denmark Finland USA USA For column above I would like the measure to first calculate the occurance of each value (USA = 3, Finland = 2, Denmark = 1), and then calculate the sum of n*(n-1) (where n = 3, 2, 1 (in example above)) Hence, the formula should calculate n*(n-1) for all values obtained for calculating the occurance of each contry (indepentedent on how many conutries that are in the list). Is this possible? Any help would be highly appriciated. Best, VilleSolved664Views0likes2CommentsRecursive relationships
Let's say we have a simple table for entities and their IDs (TableA) and another table that defines relationships in a format similar to this: IncomingID OutgoingID <some attributes that are irrelevant> 1 2 2 3 2 4 5 6 5 7 We need to be able to find all entities related to any given "starting" ID; in the sample data above, for ID=1, we would expect {2, 3, 4} as the correct set, as 2 is related to 1 and then both 3 and 4 are related to 2. Relationship defined that way can be recursive. What is the correct approach to configure this as a part of the model and what kind of DAX code can be used to achieve the sample scenario?1.3KViews0likes3CommentsBar chart: Avoiding bars without value with an condition!
Hello kind people, I am creating a bar chart which represents the number of visitors per week. I want to keep those bars with 0 visitor in the chart, but only in those weeks after the original week when they have visited! Please see the graph below what I mean: I tried with following DAX dreaming to fix the issue, but not working. Power BI had error message that "the search text provided to function "find" could not be found in the given text" even though I didn't even use Find function :O! Visitors = VAR FirstVisitDate = CALCULATE ( MIN ( 'Usage_log'[timestamp].[Date] ), 'Usage_log' ) VAR WeekDate = SELECTEDVALUE( DateTable[StartDate] ) VAR visitor = CALCULATE ( DISTINCTCOUNT(Usage_log[user_Id]), ALL(Usage_log), KEEPFILTERS(ALL('User_Categorization_Revised'[User_Type])) ) RETURN IF ( WeekDate < FirstVisitDate, BLANK(), IF(ISBLANK(visitor) || visitor = 0, 0, visitor) ) Thanks a lot in advance if you could help ❤️Solved915Views0likes7CommentsDAX - How to calculate maximum of daily unique count within current month using measure
Hi all, I want to use DAX to calculate a measure based on Powerbi Dataset. Since i need to publish it, i cannot include any calculated columns or tables. The objective is to calculate the maximum unique user utilization in the current month. The methodology is: 1. Restrict to latest month using 'Month' column, and to correct tenant. I only want 'test1'. 2. Count the unique number of user for each date -> daily utilization. 3. Return the maximum daily utilization of this latest month. The result of this measure will be displayed in a 'Card' visualization. I would also want to apply extra filter from Visualization filter to restrict user department. For the data listed below, by applying the department filter to be only 'Group 1', i would expect the correct output to be 3. 'Group 1' cannot be hardcoded like 'test1' because it is subject to change. My sample data are like this: Table 1 contains a list of user activity. User Date Month Tenant [email protected] 1-Aug-23 1-Aug-23 test1 [email protected] 1-Aug-23 1-Aug-23 test1 [email protected] 1-Aug-23 1-Aug-23 test1 [email protected] 1-Aug-23 1-Aug-23 test1 [email protected] 1-Aug-23 1-Aug-23 test1 [email protected] 2-Aug-23 1-Aug-23 test1 [email protected] 2-Aug-23 1-Aug-23 test2 Table 2 contains the details information on each user. User Department [email protected] Group 1 [email protected] Group 1 [email protected] Group 2 [email protected] Group 1 The relationship between the two tables are already build by link the two User columns.Solved944Views0likes4Comments