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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to show data from 2 columns in 1 chart with option

Hi everyone,

 

I have a question regarding demonstrating data in PoweBI Desktop. I hope you can support me.

 

Currently i have a dashboard wich connect different tables from an excel file and there is one page which relate to an excel file: employment_rate. There are 04 main columns: Location, YTD, Previous month, month of previous year.

 

I have created a clusterred column chart which show location and YTD. Now i want a solution/ button/ filter that contain information of Previous month, month of previous year so that when i choose Previous month than instead of 1 column at the moment i will have 2. And when i choose also month of the previous year i can have 03 columns.

 

Thank you very much for your supporting!!

 

1 ACCEPTED SOLUTION

Hi @Anonymous Check below video. Shall be helpful if I undersood the requirement correctly.

 

https://www.youtube.com/watch?v=gYbGNeYD4OY

 

Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous ,If you have date. Then using time intelligence and date calendar you can these easily, example given below

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
last year MTD Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))


last QTR same Month (complete) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,Qtr))))


MTD (Year End) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFYEAR('Date'[Date])))
MTD (Last Year End) Sales =  CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFYEAR(dateadd('Date'[Date],-12,MONTH),"8/31")))

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , thank you for your fast reply but actually i dont have to calculate it, those columns are already there and whenever i try to put 03 in the same chart than i have 03 columns (YTD, previous month, month of previous year) but i want to have the option that those 02 columns (previous month, month of the privious year are shown only when i select).

 

 

 

@Anonymous , refer this

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @Anonymous Check below video. Shall be helpful if I undersood the requirement correctly.

 

https://www.youtube.com/watch?v=gYbGNeYD4OY

 

Thanks
Ankit Jain
Do Mark it as solution if the response resolved your problem. Do Kudo the response if it seems good and helpful.

 

Anonymous
Not applicable

@AnkitBIthis seems to be what i need, i will try to apply and let you know the result.

Thanks a lot!😀

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors