count
154 TopicsCount of Records After Selected Date
I want to create a measure that counts the Ids where the LOI Date and the Close Date are in the same month, and I want to add a slicer where I can choose a date, and the measure only counts Ids where the LOI Date is greater than the selected date. For example, if the month is October 2024 in my Matrix and I select 10/11/2024 in the slicer, I would expect the output to be the count of all Ids where the LOI date is between 10/12/2024 and 10/31/2024 (and the close date is also in October). The following measure is returning blank for me when I select a date in my slicer (My slicer is 'LOI Date'[Date]). When I clear the slicer, the output gives me the total count of IDs where LOI Date and the Close Date are in the same month. Measure = VAR SelectedDate = SELECTEDVALUE('LOI Date'[Date]) RETURN CALCULATE ( DISTINCTCOUNT('Opportunity'[Id]), FILTER( 'Opportunity', 'Opportunity'[LOI Date] > SelectedDate && MONTH('Opportunity'[LOI Date]) = MONTH('Opportunity'[Close Date]) && YEAR('Opportunity'[LOI Date]) = YEAR('Opportunity'[Close Date]) ) )Solved458Views0likes1CommentCreate colouring on bar chart depending on conditions of a column and the count
Hi, I am looking for help to create colouring on a bar chart depending on certain conditions. I have a bar chart which displays the column Performance. The values in this column are categories. The graph shows the grand total count (%) of each category. I would like to do conditional formatting colouring on the bars with the following conditions: Meets Expectations is colour orange when, Meets Expectations + Exceeds Expectations > 90 Marginal is coloured yellow when, Marginal + Below Expectations > 40 Exceeds is coloured green when, Exceed Expectations > 30 Below is coloured red when, Below Expectations> 15 Since I am doing a grand total count of each category, I have tried to create measures for each performance category to count the grand total, but realized this does not work as it will not take the other measures into account. This is what I did: I created this conditional formatting measure Conditional Formatting Measure = Switch(TRUE(), SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Meets " && [Meets%]+[Exceeds%] > 90, "orange", SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Marginal" && [Marginal%] + [Below%] > 40, "yellow", SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Exceeds" && [Exceeds%] > 30, "green", SELECTEDVALUE('Aggregate'[PerformanceLevel]) = "Below" && [Below%] > 15, "red", "grey") Where [Exceeds%], [Meets%], [Marginal%], [Below%] are measures I created to try to capture the grand total % count. The calculations I used for each were similar: Exceeds% = [Count ExceedExpectations]/ COUNTROWS(FILTER(ALLSELECTED('A Table'),'A Table'[PerformanceLevel] IN {"Below Expectations","Marginal","Meets Expectations","Exceed Expectations" }))*100 After doing this and testing, I realized by doing the separate measures for each performance category, it was not taking the other categories into account. When I tried to sum them in the conditional formatting measure, one of them would be counted as 0. Perhaps I am overcomplicating and there is a much simple way to do this. This is a link to sample workbook: google drive How can I do this? I would appreciate any guidance and help. Thank you686Views0likes4CommentsCant use a var in count and looking for help,
Hi, I am trying to count the number of entries in a survey based on the question Value eg Question 1 Summary Table Department Question Count Responses Count Agreed Department A Question 1 3 2 Department B Question 1 3 0 Department A Question 2 3 2 RawData Table ID Department Q1 Q2 Q3 1 Department A Agree Agree Agree 2 Department b Disagree Agree Disagree 3 Department A Agree Agree Disagree I have tried using variables and count but i get an error that says i need to use a column reference. Count Responses = VAR Field = "'RawData'[" & Transformation[Question] & "]" VAR RowCount = CALCULATE(COUNT(Field)) RETURN RowCount Any pointers would be really appreciated.Solved1.8KViews0likes8CommentsDAX Summarize By Employee With Formula
I have a table like this that computes the Quota Impact by this formula. ([Quota]/([Days in Month]*8))*[Hours Closed]. It works fine when all the rows of the table are selected in the Visual. However I'm trying to group this by Employee, but it sums the Quota Amount for each location and then computes, which is expected, but I'm not certain how to calculate it something like [Quota] divided by Count by Location given there could be an entry in two different months . Summary it should look like this Bob =44/248 * 16: Emp Quota Impact Bob 2.82 Suzy 1.04 Instead I get : Bob=88/248 * 16: Emp Quota Impact Bob 5.67 Suzy 2.08 Location Quota Date Hours Closed Emp QuotaImpact Location A 44 9/1/2024 8 Bob 1.41 Location A 44 9/1/2924 8 Bob 1.41 Location B 12 9/1/2024 8 Suzy 0.38 Location C 13 9/1/2024 8 Suzy 0.41 Location C 16 10/1/2024 4 Suzy 0.25Solved665Views0likes2CommentsCOUNT/COUNTROWS return 0 instead of blank
Hello, I am currently have an issue with count/countrows. When they evaluate and return nothing it shows blank instead of 0. I have 2 tables, a calendar table and a fact table with 10 rows. I am trying to calculate the percentage of colum ORIT = "Y". Lines ORIT2 = var _orit = CALCULATE(COUNTROWS(dataVN),dataVN[ORIT]="Y") return if(ISBLANK(_orit),0,_orit) The result is this. I don't want those extra lines that mean nothing. The manufacturing data field comes from the calendar table. How can I avoid this situation and get the desired result? The .pbix file is in this link if you want to try - https://we.tl/t-bHGwtdUf5d Thank you. AndréSolved11KViews0likes6CommentsNumber of type a and b stores opening by month
So This problem is in 2 parts Firstly I want to calculate accumulative totals of store a and b types opening by end of september, october, nov and so on one column store type with vaules a,b, c and d another column dates secondly i have measure which have counted total number of stores (TOTAL_NO_STORES) and another which as counted number os stores c and d (C&D) which have already opened therefore i want to plot number of store a and b's each month add them to the the total already opened stores and divide this by total number of stores so it should go up septemner 80%, october 83% and so on. Any help greatly appreciatedSolved724Views0likes2CommentsCount Rows in Visual
I want to count rows in a Matrix visual. The row count would change based on what is selected in the slicers. I want to put the count in a card that will change dynamically based on what is selected in the slicers. The categories I have are Location and # of Sales. I tried Count(Location), but I keep getting the error "parameter is not the correct type". I tried CountRows, which asks for the table. What table? Location comes from one table and # Sales comes from another table! I'm new to this, but in Excel it's SO EASY. How can I make this work please?Solved2.4KViews0likes6CommentsCalculate in measure at column won't filter other objects
Hi! I placed this measure in "values" on a Matrix: measure = CALCULATE(sum(Fact[Totalsum]),Fact[type] = "D") But when i select anything within this matrix it will filter all objects from the model excluding Fact[type] = "D" and showing the absolute total (Measure total is selected) I also tried using SumX but didn't work: measure = SUMX(FILTER(Fact,Fact[type] = "D"),Fact[Totalsum]) Why could this be?757Views0likes2CommentsCount records with Measure as a Filter
Hello - I got stuck in something that I thought was simple. I have a simple table that looks like this: Date ID Jan 3 ABC001 Jan 3 ABC002 Jan 2 ABC002 Jan 1 ABC001 Jan 1 ABC003 This table is filtered based on the selections made on 2 date slicers (Date 1 and Date 2). The selection on Date 1 will output only the date selected, while the selection on Date 2 will create a flag if the ID is in both selected days. For example, if I apply the following selections Date 1 = Jan 3 and Date 2 = Jan 2, the table will look like this: Date ID Flag Jan 3 ABC001 No Jan 3 ABC002 Yes ABC001 is not on Jan 2, that's why Flag = No. How can I count only the records where Flag = No ? I thought it was as simple as combining CALCULATE or COUNTROWS and FILTER, but considering that Flag is a Measure I cannot make it work. Thanks in advance! DavideSolved828Views0likes3CommentsData Table Creation with FILTER DISTINC and COUNT
I have a table A: ID AGEMO BINDER 1 1 0 2 1 1 3 6 0 4 8 0 8 21 0 and I created a second table (TABLE B) from the following command: ID Target = distinct('Table A'[AGEMO]) This creates this Table B: AGEMO 1 6 8 21 In column B I need to add an additional column that counts the ID's from table 1 that correspond to each AGEMO but only to do that if BINDER=0 to give me the following in Table B: AGEMO COUNT ID 1 1 6 1 8 1 21 1 I was using this formula to do that: COUNT AGEMO = countrows(filter(relatedtable('TABLE A'),'TABLE A'[BINDER]=0)) But instead of giving me the table I want above its giving me the following table: AGEMO COUNTID 1 4 6 4 8 4 21 4 Where 4 is just the total number of BINDER=0 animals in TABLE A instead of relating them to the actual AGEMO they should be with. Can someone help me with this?Solved594Views0likes2Comments