count distinct with condition
3 TopicsCounting multiple values within a single cell for different results
I have a solution to a problem that I have but am not able to write it in DAX, in Excel this would mainly include COUNTIF(. I need to check a cell content to see if it contains a specific word 2 times, and if yes then I get a result, if not then go into another check. Here is a similar example I could think of: I want to check the title for VW, but give the output "VW" ONLY for TITLES that contain VW, not VW CV. TITLES can contain both VW and VW CV, or none of both. TITLE WANTED RESULT Test text VW and more text with VW CV VW Test text VW and nothing else VW Test text that only has VW CV 0 Test text with nothing here 0 My idea was to use a COUNTIF( function to see how many "VW" are in the title, if it is 2, then the WANTED RESULT should be VW as both will be in the TITLE. If the COUNTIF( result is 1, then check to see if that title has "VW CV", if yes then the WANTED RESULT should be 0, otherwise 1 as it has to be "VW". If the COUNTIF( result is 0, then the WANTED RESULT should be 0. If someone could put this in DAX form that would be awesome! Thanks!Solved1.2KViews0likes4CommentsCount rows from filtered measure
I have tried and tried to look for a solution, and didn't find anything that wasn't confusing. I must be over thinking this... Here is my data, it's so very simple...only one column named Animal, with 16 rows. I am looking for a measure that returns the distinct count of animals that are on the list once, and a distinct count of animals that are on this list more than once. So in this instance, that are a total of 9 different animals, 3 animals are listed once and 6 are listed more than once. Animal Lion Lion Bear Dog Cat Bird Bird Deer Monkey Monkey Cat Bear Beaver Beaver Beaver Moose I already have thisSolved4.8KViews0likes9CommentsCount distinct customers having sales
Hi everyone, I m new to Power BI and struggling with Power BI DAX. I'm trying to count Distinct customers having sales. It means when selecting relevant months, only customers having sales will be counted. I used the following measure: "CALCULATE(DISTINCTCOUNT(Rawdata[cust code]), FILTER(Rawdata, CALCULATE(SUM(Rawdata[f_Value]), ALLEXCEPT(Rawdata,Rawdata[cust code]))>0))" Error: It does not work with the condition "having sales > 0". For example, I select Oct 2019, it counts all distinct customers, including customers having sales < 0. I think the Filter function does not work, it just summerize the sales of customers of any time, not based on the months that I selected (ex Oct'19). Hope that you can help me on this issue. Thanks a lot in advance!4.2KViews0likes2Comments