help requested
282 Topicssingle measure select multiple value shows in one graph
how to show three different values in one graph Redution buckts Ex Rate New Materials scrap values 0.7 0.17 0.45 0.7 0.27 0.35 0.7 0.17 0.45 Valueof Month Values Dec 2020 120 -> starting inventory Jan 121 feb 111 March 121 --> end inventory Graph should like below any idea . thanks in advance813Views0likes2CommentsDax Query Not working
CurrentMonthLastYearCount = VAR SelectedMonth = MAX(Query1[SetupDate]) VAR LastYearSameMonthStart = EOMONTH(SelectedMonth, -12) + 1 VAR LastYearSameMonthEnd = EOMONTH(SelectedMonth, -12) RETURN CALCULATE( SUM(Query1[NewCount]), Query1[SetupDate] >= LastYearSameMonthStart && Query1[SetupDate] <= LastYearSameMonthEnd ) I am trying to write a query which shows current month last year in my matrix based on slicer date selection but this query wont return any reuslts and would show up as blankSolved1.1KViews0likes4CommentsLatitude Longitude & Top 3 Closest
Ttying to do something that I think should be simple, but I've hit a wall. I have the latitude and longitude of two locations. One set in the Rep table and the other set in the Agency table. Also have a radius of the Agency coordinates. Reps must be within the radius to be considered. The tables are not joined. I need to get the top 3 reps who are closest to the agency, using their coordinates (three columns - ClosestRep1, ClosestRep2, ClosestRep3). Feels like I should be able to create a virtual table in DAX, somehow do a lookup or cartesian join of some type to calculate all distances and get the TopN (1-3). E.g., Distance = ACOS(SIN(Distance[Latitude_1]*[PI_DIV180])*SIN(Distance[Latitude_2]*[PI_DIV180])+COS(Distance[Latitude_1]*[PI_DIV180])*COS(Distance[Latitude_2]*[PI_DIV180])*COS((Distance[Longitude_2]*[PI_DIV180])-(Distance[Longitude_1]*[PI_DIV180])))*3959 How do I first make sure a rep falls inside the radius, then calculate the distance for every rep that does, and finally rank them? All the while, the tables are not joined. Don't know if I'm looking at or thinking about it correctly. If anyone has done something like this, can you please help / point me in the right direction?Solved5.5KViews0likes11CommentsDAX in building Rolling 4 Week Average
Hi, I need help in building 4 week rolling average for "Net Change in Price and Cost" with below sample data Change in Price, Change in Cost and Net Change in Price and Cost are all 3 measures. Net Change in Price and Cost = Change in Price - Change in Cost I do have separate date table and the above data shows weekly data and my report has Invoice Date as Filter. I need to calculate rolling 4 week average, here the tweak is that for first week start date 12/07 rolling average should be same while for next 12/14 it should (-4.80% + 0.18%)/2 = -2.31% for 12/21 it should be (-4.80% + 0.18% - 0.04%)/3 = -1.55% for 12/28 it should be (-4.80% + 0.18% - 0.04% -0.65%)/4 = -1.33% for 01/04 it should be (0.18% - 0.04% -0.65% +1.03%)/4 = 0.13% as shown below I have created below DAX but its not working as expected Net Change in Price and Cost 4 Wk Rolling Avg = var start_day = MIN('Date'[Week Start Date])-21 var end_day = MAX('Date'[Week Start Date]) return CALCULATE([Net Change in Price and Cost], DATESBETWEEN('Date'[Week Start Date],start_day,end_day), REMOVEFILTERS('Date'[Week Start Date]))/CALCULATE(DISTINCTCOUNT('Date'[Week Start Date]),DATESBETWEEN('Date'[Week Start Date],start_day,end_day),REMOVEFILTERS('Date'[Week Start Date])) Can someone help me on this??Solved7.1KViews0likes5CommentsHow to get list of new items per month
I can't seem to find an answer that works for this. Basically I have a table that looks like this: Date Item Order 6/1/22 Bike 50 6/1/22 Tire 1 6/1/22 Bike 25 6/1/22 Shirt 40 5/1/22 Shirt 10 5/1/22 Shirt 1 4/1/22 Hat 15 I'd like to see something that shows the new items per month concatenated like below: Date New Items 6/1/22 Bike, Tire 5/1/22 Shirt 4/1/22 Hat Can someone help with this?Solved1.7KViews0likes5CommentsDAX Help for Sum a measure filter by another measure
Hi, I have struggled to create DAX for measure Num of Class Days with no blank usage. First I have created this measure: Num of Class Days = CALCULATE ( COUNT ( UsageRecord[Date] ), FILTER ( UsageRecord, UsageRecord[Holiday] IN { FALSE } ) ) Then I have created this measure too: Num of Usage = CALCULATE ( COUNT ( UsageRecord[ClassRoomID] ), FILTER ( UsageRecord, UsageRecord[Took Attendance] IN { TRUE } && UsageRecord[Holiday] IN { FALSE } ) ) After that, I want to create a DAX for measure sum of Num of Class Days filter by num of usage not blank or >0. I have created this DAX but not working: Num of Class Days with no blank usage = SUMX ( UsageRecord, [Num of Class Days] && [Num of Usage] > 0 ) Please help me with this. I am very happy to say thanks for your help. I also have attached the sample data on this link below: https://www.dropbox.com/s/jj5gzkzsu96oryx/Sample%20Data.pbix?dl=0 Thank you for your help. Best, LSolved686Views0likes1CommentHow to remove Scientific Notation
In my table data looks like Scientific Notation.please find the screen shot. i have used below measure for the graph Total Month = IF(SELECTEDVALUE('Order Table Total'[Sno])="6.Total Month Variation",CALCULATE(SUM('Master Data Base'[Value]),ALLSELECTED('Order Table Total'[Sno])), SUM('Master Data Base'[Value])) how to trun off scientif notation in my report . i am trying to Format i am getting Error. Looking for support.Solved8.2KViews0likes6CommentsSUMX Different Column Depending On IF Condition
Hello All, I am struggling with a measure that is trying to accomplish the following: I have a set of ID_Tasks attributed to ID_Project and I want to find the TotalSales by summing either TotalSalesSingle or TotalSalesMulti depending on if my dynamic selection (slicer on ID_Task) contains duplicate ID_Project or not. I have a first measure that checks if my selection contains duplicates or not, and counts them. Duplicates = CALCULATE(COUNT(SalesProfiles[ID_Project]), ALLSELECTED(SalesProfiles), VALUES(SalesProfiles[ID_Project])) Basically, I am looking for the following results: 1. If I select 2 ID_Task that are from different ID_Project, I want to sum the TotalSalesSingle value for each. 2. If I select 2 ID_Task that are from a shared ID_Project, I want to sum the TotalSalesMulti value for each. 3. If I select all 3 ID_Task , 2 of which share a ID_Project, and 1 does not; I want to sum the TotalSalesMulti for the 2, and TotalSalesSingle for the 1. aka it will sum values from either TotalSalesSingle or Multi depending on Duplicates = 1 or != 1, evaluated for each row. Scenarios: Single Selection: ID_Project is unique value, returns TotalSalesSingle for Total Sales Multi Selection: ID_Project is non-unique value, returns TotalSalesMulti for TotalSales Here you can see that my measure TotalSales doesnt work. I'd like it to return 231 & 351 (TotalSalesMulti column) Multi Selection: All 3 selected. Doesn't work either. In this case I'd like it to return TotalSalesMulti (231 & 351) for ID_Project = 38515, and TotalSalesSingle (856) for ID_Project = 29677. This is my current measure for TotalSales which is far from working. Total Sales = SUMX ( ProjetList, IF( [Duplicates] = 1, SUMX ( SalesProfiles , SalesProfiles[TotalSalesSingle] ) , SUMX ( SalesProfiles , SalesProfiles[TotalSalesMulti] ) ) ) I've included the files below. https://1drv.ms/f/s!AndVpJp2VQectSrHRNEZnOIC2Kqj?e=CA0QS6 Please let me know what you think, and if I wasn't clear about anything. Thank you!Solved3.2KViews0likes10CommentsNeed help quick! Percent On Time measure not working with filters?
I have a whole page dedicated to exploring our products that have shipped late, meaning there is a page filter for [On Time Ship]="False". I also have a measure to calculate the % on time for each product. The formula is: % On Time = CALCULATE(DISTINCTCOUNT(CVD_OTD_FTMS_IV[Reference Number]),CVD_OTD_FTMS_IV[On Time Ship]=true(),REMOVEFILTERS(CVD_OTD_FTMS_IV[On Time Ship]))/CALCULATE(DISTINCTCOUNT(CVD_OTD_FTMS_IV[Reference Number]),REMOVEFILTERS(CVD_OTD_FTMS_IV[On Time Ship]))​ where [Reference Number] is the unique identifier for someone's ordered item. This measure isn't working the way I want it to and I am not sure why. The count of late items works as expected, but the total count (or denominator in my % on time measure) doesn't show what I expect unless I remove the page filter for [On Time Ship]="False". I don't know why this would be the case since I have a RemoveFilters command in the measure formula?? For example, the product below shows this with the page filter applied: and the same product without the page filter applied: The real total count is 277 for this product. Why is it only 55 when the page filter is applied?? I need help rather quickly, please and thank you!!1.2KViews0likes6Comments