Forum Discussion
How to duplicate values from grouped measures into additional virtual groups
- 6 years ago
Now that you have your Years table, you could use an expression like this for your population to get the most recent non-blank population
Population = VAR __thisyear = SELECTEDVALUE ( Years[Year] ) VAR __summary = ADDCOLUMNS ( FILTER ( ALL ( Years[Year] ), Years[Year] <= __thisyear ), "@Pop", CALCULATE ( SUM ( PlacePopulation[Population] ) ) ) VAR __Top1 = TOPN ( 1, FILTER ( __summary, [@Pop] > 0 ), Years[Year] ) VAR __result = MAXX ( __Top1, [@Pop] ) RETURN __resultIf this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Hi cesarvinas ,
It is suggested to upload your file to OneDrive for Business and then paste the link here. Please remove sensitive information.
Best Regards,
Icey
Thank you, Icey. My organization doesn't allow to share through Links so sharing from my personal OneDrive: https://1drv.ms/u/s!AhZX9OMsvgRuiMcYzIJk3lIEfF_0_A?e=RVGc5b.
mahoneypat, I hope the example PBIX is helpful. Let me know please.
- cesarvinas6 years agoAdvocate I
mahoneypat, I'm accepting your solution as it did solve my initial need. I've not been able to come up with DAX metrics for the rest of my needs so for now I decided to use Power Query to duplicate the most current year of pouplation data into missing next years up to current one. With that I'm able to build simpler metrics and consumers can drill them now. Thank you for all the help!