Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello all. I am struggling with this calculation.
I have these three columns in the same query.
Of course there are more rows.
What I cannot do is COUNT the number of "Overall evaluation 0-4" corresponding to the TOPN 3 "Data prelievo" dates for each "Caratteristica".
I expect as output a visual table with two columns: 1) the counted number and 2) the date, on three rows only BTW.
What I have tried so far is a measure like:
CALCULATE(COUNT([Overall evaluation 0-4]) , [Caratteristica]="Durezza" , TOPN(3 , 'query/table name' , [Data prelievo] , DESC))
I can get the "Caratteristica" filtered, but never the top 3 related dates. Everytime I have all the existing dates as result and not only the first 3 rows. Note: I ain't looking fot the absolute last 3 dates in the table, I need the last 3 related to the column "Caratteristica".
Only for the record, I know for sure that there is only 1 value of "Overall ev." for a single day / date. It's a crosscheck that I need to do thus I cannot perform it by PBI built in filters.
Thanks in advance
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 8 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 29 | |
| 19 | |
| 17 | |
| 11 | |
| 10 |