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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Rygar
Helper II
Helper II

Total capacity per Year, Quarter, Month etc

Hello to the community!

 

Maybe someone can help with this:

Two Tables with Relations.
First: Available Capacity
Second: booked Capacity

Tables.JPG

When I create a Chart and drill down, I always see the total available Capacity (1000):

Charts.JPG

What I need is: When I drill down the chart, I need the total available Capacity per Quarter (Total Capacity/4), per Month (Total Capacity/12) etc.

Here ist the Data
Sounds easy, but I have no idea.

 

Thanks and regards,
Michael

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Rygar 

 

You can add a date table to the model and have separate Year/Quarter/Month columns in it. Use these manually created columns on axis in the chart. 

22020102.jpg

 

Then create below measure. Do not change the order of Month/Quarter/Year. Use this measure as Line value in the chart. 

Available = 
SWITCH (
    TRUE (),
    ISINSCOPE ( 'Date'[Month] ), SUM ( 'Available Capacity'[Capacity] ) / 12,
    ISINSCOPE ( 'Date'[Quarter] ), SUM ( 'Available Capacity'[Capacity] ) / 4,
    ISINSCOPE ( 'Date'[Year] ), SUM ( 'Available Capacity'[Capacity] )
)

 

Result

22020103.jpg

 

I attached a demo pbix below. Hope it helps.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

4 REPLIES 4
v-jingzhang
Community Support
Community Support

Hi @Rygar 

 

You can add a date table to the model and have separate Year/Quarter/Month columns in it. Use these manually created columns on axis in the chart. 

22020102.jpg

 

Then create below measure. Do not change the order of Month/Quarter/Year. Use this measure as Line value in the chart. 

Available = 
SWITCH (
    TRUE (),
    ISINSCOPE ( 'Date'[Month] ), SUM ( 'Available Capacity'[Capacity] ) / 12,
    ISINSCOPE ( 'Date'[Quarter] ), SUM ( 'Available Capacity'[Capacity] ) / 4,
    ISINSCOPE ( 'Date'[Year] ), SUM ( 'Available Capacity'[Capacity] )
)

 

Result

22020103.jpg

 

I attached a demo pbix below. Hope it helps.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi v-jingzhang,

that's exactly I was looking for! Cool trick with the Date-Table.

Thank you very much for the clear solution and for the very good example!

Best Michael

 

Greg_Deckler
Super User
Super User

@Rygar Are the tables related? If so, which direction is the relationship?



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hey Greg,

 

yes, the tables are related 1:N (Dimension table : Fact Table)

Bild1.png

Best Michael

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.