Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi. I'm trying to SELECTCOLUMNS() to return a table with a single column [customer1] and then use SUMMARIZE() to count how many rows are present for each customer. This sounds fairly simple but I need to do it each month across a date range that is user-filterable.
I built a small demo model in Power BI to investigate the problem I am having with the "temp1" measure. The DAX is:
| customer | startdate | stopdate |
| a | 01/01/2017 | 26/12/2018 |
| b | 31/01/2017 | 07/04/2018 |
| c | 02/03/2017 | 16/05/2018 |
| c | 01/04/2017 | 03/04/2018 |
| c | 01/05/2017 | 29/10/2018 |
| f | 31/05/2017 | 30/11/2018 |
| g | 30/06/2017 | 22/11/2018 |
| h | 30/07/2017 | 14/05/2019 |
| i | 29/08/2017 | 30/05/2019 |
| j | 28/09/2017 | 15/12/2018 |
| k | 28/10/2017 | 26/10/2019 |
| l | 27/11/2017 | 08/01/2019 |
And the "date" table is built by:
My desired output from the temp1 measure would be like this:
customer prods_pers_cust
a 1
b 1
c 3
f 1
....
Thanks.
Solved! Go to Solution.
@Anonymous , check if this between logic can help
Hi @Anonymous ,
Please try:
Measure = CALCULATE(COUNT('Table'[customer]),FILTER('Table',[startdate]>=MIN('date'[Date]) && [stopdate]<=MAX('date'[Date])))
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , check if this between logic can help
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 68 | |
| 34 | |
| 33 | |
| 30 |