Forum Discussion
Pie Chart Problems - Can't Add Values for Totals Using Last Date Only
- 4 years ago
Hi, julesdude ;
You could create a measure.
total = var _max=CALCULATE(MAX('TableA'[Date]),ALLEXCEPT(TableA,'TableA'[Country])) return CALCULATE(SUM('TableB'[Total Value]),FILTER(TableB,[Date]=_max))The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi julesdude
As long as you have the ability to identify which Asset Reference belongs to which Country, then you can do it. The issue in this instance, with the data that currently exists in Table A and Table B, it cannot be done.
When I was putting together a new measure for you which started with a LOOKUPVALUE as the first variable, it wasn't letting add 'Table A'[Country] as the third parameter being the Search Value. The reason for this is because there's no way for Power BI to determine which Asset Reference belongs to a specific Country with respect to the population of data that currently exists.
Unless there is other data that you have which has not been shared, there is no way in which the outcome can be achieved unfortunately (from my understanding).
I hope this makes sense.
Theo
Hi TheoC
Yes I'm afraid although I've simplified and I've taken a number of columns out that aren't relevant, this is all I've got that's relevant to this issue.
Ok, I have merged the query to bring a country reference column into table B so that I now have this:
Updated file:
Can your DAX above be adapted to now just reference this table in some way?