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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I
Helper I

Grouping based Selected value

Hi Team,


I'm new to power bi,  kindly help me out for below requirement.

I have month-year slicer.

If we selected any one of the month, i needed sum of previous month data and current month data in two bars.


we need to group before month in one bar and selected month in one bar.




the final output i need is if we select any month, the bar should be group into two bars one is selected month bar and previous month bar.  Please help me if it not works and do let me know the alternative.


Thanks & Regards,



Super User
Super User

@siva54 , if you have date , then you can use time intelligence two get current and prior


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


Power BI — Month on Month with or Without Time Intelligence



But if you want more than one month as a legend, then you need an independent table

Need of an Independent Date Table:

Hi amitchandak,


I need based on selected value of Month text.


For example, if we select may 21 then till may 21 in one bar and May 21 in another bar.




Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.