Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
HI guys,
I'm trying to get number of clients who meet certain conditions.
Clients who didn't have any sales before certain period and who have sales after certain period.
So I have 2 measures:
before = CALCULATE([Total Revenue];DATESBETWEEN(Calendar[Date];DATE(2018;03;01);DATE(2018;08;31)))+0
after = CALCULATE([Total Revenue];DATESBETWEEN(Kalendarz[Date];DATE(2018;9;1);date(2018;12;31)))+0
Then I've used IF funciton:
True/False = IF([before]=0 && [after]>0 ;"true";"false")
Now I'd like to count the "true" clients so I tried something like this:
True count = CALCULATE(DISTINCTCOUNT('Clients'[Code]);FILTER('Clients';[True/False]="true"))+0
and it works in most cases, but not always. As you can see on the screenshot below: B193A is marked as "false" but it is counted as "True".
I'm missing something here but not sure what it is;)
Hi,
Try this measure
=COUNTROWS(FILTER(SUMMARIZE(VALUES(Clients[Code]);[Code],"ABCD";CALCULATE([Total Revenue];DATESBETWEEN(Calendar[Date];DATE(2018;03;01);DATE(2018;08;31)))+0,"EFGH",CALCULATE([Total Revenue];DATESBETWEEN(Kalendarz[Date];DATE(2018;9;1);date(2018;12;31)))+0),[ABCD]=0&&[EFGH]>0))
Hope this helps.
Hi @jajecko,
Could you please offer some sample data to have a test or share the pbix file if possible?
Regards,
Daniel He
Missing Screenshot... Please attach the screenshot to understand your issue in detail...
Proud to be a PBI Community Champion
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |