Forum Discussion
Calculating Multiple Periods at Once
Hoping someone can help, I imagine it's simple but have been trying for ages, and cant find anything online either.
I have a table with a list of clients, all with their own fiscal year. I have another (linked) table with values by period. Finally, i have a table with a list of years to select.
I want to sum up the fiscal year by client based on a dropdown, so for example, they select 2019, and it totals the 2019 client fiscal years (some will start in jan 2019, others in apr 2019 etc). I know the dropdown piece, i'm just struggling with how to essentially calculate customer individually with one measure. Can anyone point me in the right direction?
1 Reply
- Greg_DecklerCommunity Champion
This will depend heavily on your data and how it is structured. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
But in general, you would do something along the lines of:
Measure =
VAR __Client = MAX('Table'[Client])
VAR __Table =
SWITCH(__Client,
"One",ALL('TableOneClient'),
"Two",ALL('TableTwoClient)
)
RETURN
<some calculation>