Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
105 | |
87 | |
74 | |
66 |
User | Count |
---|---|
124 | |
112 | |
96 | |
80 | |
72 |