Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I have 2 issues I need a support from the community.
I would like to calculate sum of "Wartość jednostek" for last day of the selected period. During troubleschooting I created "measure" and "measure 2" but none of those is really working as intended.
update: displaying summary for the last day is solved by puting that into separate card with top 1 flitering by latest date. Unfortunatelly calculation is still wrong and missing calculation for a middle date.
Second issue is that none of those sumarize values from date in the middle. It seems that the issue may be linked to the way both tables are connected. Inside the table 2 there is no data for 2022-10-11. For this day previous values are taken.
PBIX attached here
Solved! Go to Solution.
The solution was to pivot both tables and use the following formula to fill missing values:
Measure 2 =
var last_date = LASTDATE('Table1'[Date])
return SUMX (FILTER('Table1','Table1'[Date] = last_date), [Wartość jednostek] )
There is no need to check for HASONEVALUE - the SUMX formula also work for single items.
@lbendlin It is not really working:
values for 11.10 are not calculated, values for 12.10 are calculated wrongly
| Date | Column1 | Max of wycena | Running ilosc jednostek | Wartość jednostek | Measure 2 | expected value | daily subtotal | last date |
| 2022-10-10 00:00 | a | 127,68 | 61,96 | 7911,05 | 7911,05 | 7911,05 | 2022-10-10 00:00 | |
| 2022-10-10 00:00 | b | 592,61 | 24,05 | 14252,27 | 14252,27 | 14252,27 | 2022-10-10 00:00 | |
| 2022-10-10 00:00 | c | 123,59 | 90,02 | 11125,57 | 11125,57 | 11125,57 | 33288,90 | 2022-10-10 00:00 |
| 2022-10-11 00:00 | a | 127,55 | 61,96 | 7903,00 | 7903,00 | 2022-10-11 00:00 | ||
| 2022-10-11 00:00 | b | 591,05 | 24,05 | 14214,75 | 14214,75 | 2022-10-11 00:00 | ||
| 2022-10-11 00:00 | c | 125,88 | 90,02 | 11331,72 | 11331,72 | 33449,47 | 2022-10-11 00:00 | |
| 2022-10-12 00:00 | a | 126,15 | 94,04 | 11863,15 | 4046,89 | 11863,15 | 2022-10-12 00:00 | |
| 2022-10-12 00:00 | b | 593,55 | 48,1 | 28549,75 | 14274,88 | 28549,76 | 2022-10-12 00:00 | |
| 2022-10-12 00:00 | c | 121,08 | 188,25 | 22793,31 | 11893,69 | 22793,31 | 63206,21 | 2022-10-12 00:00 |
it is not clear (to me) how you want to group this. Is it last date by Column1, or last date overall?
Maybe the table was misleading little bit. I do not want to display "daily subtotal" in a table.
What I would like to achieve is something like this:
where measure 2 is a sum of "wartosc jednostek". The problem is that:
- for 2022-10-10 it is working fine
- for 2022-10-11 it is not working at all
- for 2022-10-12 calculation is wrong
PBIX attached here
The solution was to pivot both tables and use the following formula to fill missing values:
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 50 | |
| 38 | |
| 31 | |
| 27 |