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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply

Trouble with Clustered Column X-Axis with two columns.

So I have a dataset that has a Date Originated Column and a Date Complete Column for entries. I want to create a Clustered Column chart where in the x-axis is Jan - Dec only 2022. How would I create one bar that is the Date Originated Column(total count of all the entries that originated that month) and the other is the Date Complete(all entries that were completed that month)? Some entries have a Date originated before 2022 which i don't want to included.

1 ACCEPTED SOLUTION
v-cgao-msft
Community Support
Community Support

Hi @powerbinoobster ,

Please new a calendar table like:

Calendar = 
ADDCOLUMNS(
    CALENDAR(MIN('Table'[Date Originated]),MAX('Table'[Date Complete])),
    "Year",YEAR([Date]),
    "Month",FORMAT([Date],"mmm"),
    "Month Number",MONTH([Date])
)

vcgaomsft_0-1667291877649.png

Relationships:

vcgaomsft_1-1667291908913.png

Then new 2 measures:

Count of Date Originated = COUNTROWS('Table')
Count of Date Complete = CALCULATE(COUNTROWS('Table'),USERELATIONSHIP('Table'[Date Complete],'Calendar'[Date]))

and apply them with 'calendar'[year] and [month] to the visual and setting filter like:

vcgaomsft_2-1667292052474.png

The PBIX file is attached for reference.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

1 REPLY 1
v-cgao-msft
Community Support
Community Support

Hi @powerbinoobster ,

Please new a calendar table like:

Calendar = 
ADDCOLUMNS(
    CALENDAR(MIN('Table'[Date Originated]),MAX('Table'[Date Complete])),
    "Year",YEAR([Date]),
    "Month",FORMAT([Date],"mmm"),
    "Month Number",MONTH([Date])
)

vcgaomsft_0-1667291877649.png

Relationships:

vcgaomsft_1-1667291908913.png

Then new 2 measures:

Count of Date Originated = COUNTROWS('Table')
Count of Date Complete = CALCULATE(COUNTROWS('Table'),USERELATIONSHIP('Table'[Date Complete],'Calendar'[Date]))

and apply them with 'calendar'[year] and [month] to the visual and setting filter like:

vcgaomsft_2-1667292052474.png

The PBIX file is attached for reference.

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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