Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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 1
Greg_Deckler
Community Champion
Community 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>



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors