Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Data...
| Client ID | Date |
| A1 | 01-Aug-22 |
| A2 | 02-Aug-22 |
| A2 | 03-Aug-22 |
| A3 | 04-Aug-22 |
| A3 | 05-Aug-22 |
| A3 | 06-Aug-22 |
| A4 | 07-Aug-22 |
| A4 | 08-Aug-22 |
| A4 | 09-Aug-22 |
| A4 | 10-Aug-22 |
| A5 | 11-Aug-22 |
| A5 | 12-Aug-22 |
| A5 | 13-Aug-22 |
| A5 | 14-Aug-22 |
| A5 | 15-Aug-22 |
I want a measure to count Client Id for Date>= 10th Aug, 2022 in table visual as shown below...
| Client ID | Date | Reqirement |
| A4 | 10-Aug-22 | ---1 |
| A5 | 11-Aug-22 | ---5 |
| A5 | 12-Aug-22 | ---5 |
| A5 | 13-Aug-22 | ---5 |
| A5 | 14-Aug-22 | ---5 |
| A5 | 15-Aug-22 | ---5 |
Solved! Go to Solution.
Hi @ddpl ,
I think you can try this code to create a measure.
Count =
IF (
MAX ( 'Table'[Date] ) >= DATE ( 2022, 08, 10 ),
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Client ID] ),
'Table'[Date] >= DATE ( 2022, 08, 10 )
)
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can go through Quick measure-> Total for category (filters applied)->
Base Value = Client ID and Category = Date
and drag in matrix
I'm expecting something like below...
Hi @ddpl ,
I think you can try this code to create a measure.
Count =
IF (
MAX ( 'Table'[Date] ) >= DATE ( 2022, 08, 10 ),
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Client ID] ),
'Table'[Date] >= DATE ( 2022, 08, 10 )
)
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
It worked as expected, Thanks for your sharp DAX.
@ddpl , Use an after date slicer, Create a date table and join that with your table and create measure like
calculate(countrows(Table), allselected(Date))
or with selected date as 10th
calculate(countrows(Table), filter(all(Date), date[Date] >= maxx(allselected(Date) , date[Date]) ) )
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 |
|---|---|
| 49 | |
| 44 | |
| 42 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 73 | |
| 71 | |
| 34 | |
| 33 | |
| 31 |