@need help
21 TopicsEliminating zero values from Matrix visual
I have a matrix that shows three measures Billed_Hours, Unbilled_Hours, and Total_Hours for each project project. The formula for the measure Billed_Hours is : Billed_Hours = var BilledHr= calculate(sum(project_time[hours]) , project_time[is_billed]=TRUE ) Return switch(true, chgHr = 0,0, BilledHr) Unbilled_Hours measure is the opposite of the Billed_Hours. There are some projects with both billed and unbilled Hours equal to zero for whatever reason and I want to eliminate those projects from the matrix using a Dax measure that verifies if billed and unbilled hours are zero (it can check the Total Hours calculated column of the table as well) and eliminate these projects from the visual. Is it possible? (Note: For now, I got this done by putting in a measure in the filter pane that checks for ISEMPTY(project_time) and returns 1 or 0 but I would like to know how to do this using Dax. Would appreciate your help)Solved2.3KViews0likes3CommentsFiltering a table using TOP N slicer
Hi, i have a TOP N slicer which is a what if parameter from 0 to 50, i am trying to filter TOP N qty for a product in a table. please note there is already a TOPN filter on week for the table visual like pic below, so another topn is not possible and the data does not have an id/unique column and the products are repeted several times and the week in the sample is different from the topn loaddateweek. I am using a DAX measure to calculate the top products TOP N measure = VAR SelectedTop = SELECTEDVALUE('TOPN'[TOPN]) RETURN SWITCH(TRUE(), SelectedTop = 0, [Still to supply_sum], RANKX( ALLSELECTED(table[week],table[Product]), [Still to supply_sum], ,DESC,Dense ) <= SelectedTop, [Still to supply_sum] ) but this is not filtering for only 1 value when top n filter selected =1, but shows multiple value. Sample data is like below: Week Product Still to supply_sum rank 2024 34 6708 58720 1 2024 40 7706 64919 1 2024 38 6708 48120 2 2024 40 6708 43040 2 2024 38 731 34400 3 2024 36 6708 33560 3 2024 39 7448 36000 3 2024 41 6961 32040 5 2024 38 300 30080 6 2024 36 300 28120 7 2024 30 7551 24720 9 2024 41 122116010 22160 10 2024 36 731 21560 11 2024 41 7551 19790 15 2024 32 7551 19168 17 2024 31 300 16204 24 2024 32 300 15669 25 Not sure how to solve this issue to just have rank that does not repeat for a another row for the same product. Thanks for the help in advance.Solved1.2KViews0likes3CommentsNeed help Calculate Prior year values working for one other filter
Hi , I am working on the data where I am calculating the sum of appointments total by prior fiscal year. to calculate the prior year values , I have used a calculation suggested by this forum, it works fine when we select year filter, but the moment I select other filter this calculation prior year calculation doesnot hold good. How do I correct it ? This is the calculation I am using to calculate previous year calculate(sum('OLD ONE'[COUNT(DISTINCT APT)]),filter(ALL('OLD ONE'),[FISCAL_YEAR_NUM]=SELECTEDVALUE('OLD ONE'[FISCAL_YEAR_NUM])-1)) Now I want this calcualtion to work for other region level filter too . the moment I chose a region filter the prior year filter is not workingSolved596Views0likes2CommentsIssue with Displaying Correct Subtotals in Matrix Visual
Hello, I'm seeking assistance with a matrix visual in Power BI where I need to use a specific column as a value without aggregation. Despite my efforts, the subtotals are not displaying as expected. Background In my 'Table_2', there's a column named (0-1) that I specifically want to display as it is, without any aggregation, in a matrix visual. To ensure that Power BI displays the exact values from this column without summing them up or applying any other aggregate functions, I've created a measure with the following DAX formula: 0-1 Measure= VAR SelectedValue = SELECTEDVALUE('Table_2'[(0-1)]) RETURN IF(ISBLANK(SelectedValue), 0, SelectedValue) Sample Input Data Below is a sample of the data from 'Table_2': Names (0-1) AA 200 BB 300 CC 400 DE 300 Matrix Visual Configuration - Rows: Names - Values: The measure based on the (0-1) column Current Output with Issue The matrix correctly displays the individual (0-1) values for each ID, but the subtotal is incorrectly showing as 0. Matrix Visual: Names (0-1) AA 200 BB 300 CC 400 DE 300 Subtotal 0 Desired Output I need the subtotal to accurately sum the individual (0-1) values: Names (0-1) AA 200 BB 300 CC 400 DE 300 Subtotal 1200 The Challenge How can I modify my measure or adjust the matrix settings to ensure that the subtotals correctly calculate the sum of the (0-1) values at each hierarchy level? I would greatly appreciate any advice or solutions that could help me resolve this issue with the subtotals. Thank you for your time and assistance! Warm regards, SBCSolved2.6KViews0likes7CommentsRolling Sum for a subset of data
Hi Everybody, I am struggling with a DAX Formula: Calculation works for the overall time range, as you can see in the table, but it doesn't work for specified time range (15th to 23rd ). The rolling sum for this time range should start with 0 instead of 1 This is my DAX Formula: Cumulative Rolling Sum Value_B = CALCULATE( SUM('Sheet1'[Value_B]), FILTER( ALL('Sheet1'), 'Sheet1'[Date] <= MAX('Sheet1'[Date]) ) ) Any ideas what I am doing wrong ?472Views0likes2CommentsDynamic table
Hello, I'm trying to create a dynamic table in Power BI. I'll give the context: I have an Excel file with several data tables. I have a Power BI dashboard with a visual Filter and each filter corresponds to a table in the Excel file. I would like the table to change depending on the filter selected, taking the right data from the right table in the Excel file (depending on the filter selected on the visual, the table should take the right table and display the right data on the report). My idea: I thought of creating a calculated table with a formula that would say: "If on visual X, filter Y is selected then my table is T1 otherwise my table is T2." Something like that. In my idea, I need to specify exactly which visual it is, either with the exact name of the visual, or with a unique id. If this is not possible, can you suggest an alternative solution? Thanks in advance536Views0likes1CommentTotalYTD or DatesYTD based on SLicer filter
Hello everyone, I have a totalytd measure, and creating a bar chart based on date and total sales. Also I have a slicer which contains Month Name. If I filter for March month, the bar chart will show data only for March month but my requirement should be like the visual should display till March month (Jan, Feb and Mar). Likewise if I select June month in the slicer, the bar chart should display data from January to June. How to achieve this, please advice.437Views0likes1CommentHello All, How to compare Date & Time using the text field. Dax or Measure?
Hi Everyone, Could someone please help me out with DAX for below as I am stuck in middle. Below is my sample data Resource Name DIS_scheduled Scan Time TEST_CONCURRENT_SCANS_ORA_SM_8 SM_PROFILING_PRD 12/26/2023 14:30 TEST_CONCURRENT_SCANS_ORA_SM_7 SM_PROFILING_PRD 12/26/2023 14:30 TEST_CONCURRENT_SCANS_ORA_SM_6 SM_PROFILING_PRD 12/26/2023 14:30 TEST_CONCURRENT_SCANS_ORA_SM_5 SM_PROFILING_PRD 12/26/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_4 SM_PROFILING_PRD 12/26/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_3 SM_PROFILING_PRD 12/26/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_2 SM_PROFILING_PRD 12/26/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_1 SM_PROFILING_PRD 12/26/2023 13:00 TEST_CONCURRENT_SCANS_ORA_MD_5 MD_PROFILING_PRD 12/27/2023 12:00 TEST_CONCURRENT_SCANS_ORA_MD_4 MD_PROFILING_PRD 12/27/2023 12:00 TEST_CONCURRENT_SCANS_ORA_MD_3 MD_PROFILING_PRD 12/27/2023 13:30 TEST_CONCURRENT_SCANS_ORA_MD_2 MD_PROFILING_PRD 12/27/2023 15:00 TEST_CONCURRENT_SCANS_ORA_MD_1 MD_PROFILING_PRD 12/27/2023 11:00 TEST_CONCURRENT_SCANS_ORA_LG_3 LG_PROFILING_PRD 12/28/2023 13:00 TEST_CONCURRENT_SCANS_ORA_LG_2 LG_PROFILING_PRD 12/28/2023 11:00 TEST_CONCURRENT_SCANS_ORA_LG_1 LG_PROFILING_PRD 12/28/2023 9:00 TEST_CONCURRENT_SCANS_ORA_XL_2 XL_PROFILING_PRD 12/29/2023 10:00 TEST_CONCURRENT_SCANS_ORA_XL_1 XL_PROFILING_PRD 12/30/2023 7:00 TEST_CONCURRENT_SCANS_ORA_SM_8 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_7 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_6 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_5 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_4 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_3 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_2 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_SM_1 SM_PROFILING_PRD 12/31/2023 13:00 TEST_CONCURRENT_SCANS_ORA_MD_5 MD_PROFILING_PRD 12/31/2023 11:00 TEST_CONCURRENT_SCANS_ORA_MD_4 MD_PROFILING_PRD 12/31/2023 11:00 TEST_CONCURRENT_SCANS_ORA_MD_3 MD_PROFILING_PRD 12/31/2023 11:00 TEST_CONCURRENT_SCANS_ORA_MD_2 MD_PROFILING_PRD 12/31/2023 11:00 TEST_CONCURRENT_SCANS_ORA_MD_1 MD_PROFILING_PRD 12/31/2023 11:00 TEST_CONCURRENT_SCANS_ORA_LG_3 LG_PROFILING_PRD 12/31/2023 9:00 TEST_CONCURRENT_SCANS_ORA_LG_2 LG_PROFILING_PRD 12/31/2023 9:00 TEST_CONCURRENT_SCANS_ORA_LG_1 LG_PROFILING_PRD 12/31/2023 9:00 TEST_CONCURRENT_SCANS_ORA_XL_2 XL_PROFILING_PRD 12/31/2023 7:00 TEST_CONCURRENT_SCANS_ORA_XL_1 XL_PROFILING_PRD 12/31/2023 7:00 so here >> any resource should not be scheduled(i.e. Scan_time column above) if there are resources already scheduled upto 2 hrs before for DIS_scheduled = "SM_PROFILING_PRD" >> any resource should not be scheduled if there are resources already scheduled upto 5 hrs before for DIS_scheduled = "MD_PROFILING_PRD" >> any resource should not be scheduled if there are resources already scheduled upto 10 hrs before for DIS_scheduled = "LG_PROFILING_PRD" >> any resource should not be scheduled if there are resources already scheduled upto 24 hrs before for DIS_scheduled = "XL_PROFILING_PRD" So for Example, For DIS_scheduled = "SM_PROFILING_PRD", if 2 Resources have Scan_time on 12/31/2023 14:30 but there are already resources having Scan_time at 12/31/2023 13:00 which is an issue as no resource should be scheduled 2hrs before I have to use Scan_Time column to check above conditions and create new column with output as "Issue" or "No issue" Please let me know if more data is required. ThanksSolved1.6KViews0likes6CommentsMeasure Should populate ID row in Matrix
Good morning I have a matrix visual with IDs on the row Level from 'DIM Emp'[EmpID] I would like to create a measure that populates the row of certain ids. In this case IDs 5 & 6 should be populated with the result of the 1st part of the measure, the rest with the 2nd part Something along the lines of Emp = IF ( MAX ( 'DIM Emp'[EmpID]) IN { 5 , 6} CALCULATE ( SUM ( 'HC'[Amount] ), KEEPFILTERS ( 'DIM Emp'[EmpID] IN { 2, 3, 4 } ) ) - CALCULATE ( SUM ( 'HC'[Amount] ), KEEPFILTERS ( 'DIM Emp'[EmpID] = 7 ) ) , CALCULATE ( SUM ( 'HC'[Amount]), KEEPFILTERS ( 'DIM Emp'[EmpID] IN { 11, 10, 12 } ))) Thanks937Views0likes3Comments