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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
0xygen27
Advocate II
Advocate II

Power BI sum up quarters from two years

Dear Community,

 

I am working with an excel file and in this excel file there are two years. When I make a column chart at the level of quarters Power BI's stacks them on top of each other. How can I make a chart with the eight quarters separated. 

 

The info is:

Date                 Visitors

01-01-2016         100

01-05-2016          150

01-09-2016          50

01-12-2016         75

01-01-2017         150

01-05-2017         125

01-09-2017          200

01-12-2017         300

 

Now I get four quarters with the sum of the specific quarter per year.

I want eight quarters with the amount of visitors of that specific year.

 

Hope you guys can help me out.

 

Greetings, 

 

0xygen27.

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Or drag your Date column once to the Axis - select Date Hierarchy - keep only Quarter

 

and then drag the Date column again but this time to the Legend - select Date Hierarchy - keep only Year

 

Chart7.png

 

EDIT: But to achieve the result from my first post...

Drag the Date Column only to the Axis  - select Date Hierarchy - keep only Year and Quarter and then click Expand All

View solution in original post

4 REPLIES 4
Sean
Community Champion
Community Champion


@0xygen27

I'm not really sure are going after the results in green column (just drag visitors to the Values)

or the result in the black columns?

 

Measure =
CALCULATE (
    SUM ( 'Table'[Visitors] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Date].[Year] = ALLSELECTED ( 'Table'[Date].[Year] )
    )
)

 

Chart6.png

 

Hope this helps! Smiley Happy

Thnx for your reply, I see now that I didn't wrote cristal clear what I meant.

 

The situation what I have now is that power bi sums the quarter 1 of 2016 and 2017. I don't want that, I want to have every quarter on it's own. Which will result in 8 quarters. 

When I read my title I see that it isn't very clear. The problem is that it sums up and I don't want that.

@0xygen27

 

In the column Chart click on this Icon (RED)

 

Quarters.png




Lima - Peru
Sean
Community Champion
Community Champion

Or drag your Date column once to the Axis - select Date Hierarchy - keep only Quarter

 

and then drag the Date column again but this time to the Legend - select Date Hierarchy - keep only Year

 

Chart7.png

 

EDIT: But to achieve the result from my first post...

Drag the Date Column only to the Axis  - select Date Hierarchy - keep only Year and Quarter and then click Expand All

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.