Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Guys, all right?
I have a dataset with 2 columns (Product Code, Date), I need to map the products that are recurring for example (today() and today()-1), the big problem is that I have 1 date per line as in the example below
| Codigo produto | Data |
| 001 | 01/02/2021 |
| 001 | 02/02/2021 |
| 001 | 03/02/2021 |
| 001 | 04/02/2021 |
| 001 | 05/02/2021 |
| 001 | 06/02/2021 |
| 001 | 07/02/2021 |
| 002 | 01/02/2021 |
| 002 | 02/02/2021 |
| 002 | 03/02/2021 |
| 002 | 04/02/2021 |
| 002 | 05/02/2021 |
| 002 | 06/02/2021 |
| 002 | 07/02/2021 |
| 002 | 08/02/2021 |
Solved! Go to Solution.
Please consider this solution and click the thumbs up icon just for me taking the effort to helping you, and click accept the solutioin if it fixes your problem. Cheers !
Please consider this solution and click the thumbs up icon just for me taking the effort to helping you, and click accept the solutioin if it fixes your problem. Cheers !
It didn't work, I need to count the products that were yesterday and today, so I need the two values to define the recurrence
If you create a visual table with product and date then this measure will flag any product that has a record for the previous day. I tested it ok
Okay, I need it to filter by product code, that way it would only evaluate the date, right?
Hi again Vitor_sp_bo
Report visuals have default row and column filters. In this case Product and Date.
The CALCULATE command is amazing and lets you override one or more of these default row filters.
In my example the CALCULATE command does not override the default row Product filter, but it does override the default row Date filter with the previous date. So this will only get the previous date for the same Product, because the default row Product filter is still applied. Understand now?
You can sort the visual by Product and Date and the measure will still work ok, because the measure uses the source data and not the sequence of report rows.
You can add a Product slicer but take care adding a Date slicer.
Please click the thumbs up and ACCEPT SOLUTION. Thank you
Reoccurs =
var mydate = SELECTEDVALUE('Table'[Date])
var prevdate = mydate - 1
RETURN
CALCULATE(
COUNTROWS('Table'),
'Table'[Date] = prevdate
)
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 41 | |
| 37 | |
| 34 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 64 | |
| 58 | |
| 31 | |
| 25 | |
| 25 |