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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Priyanka2
New Member

Dynamic Measures based on filter selection

Hi Everyone,

 

This is Priyanka here.

I've started working on Power BI recently.

I'm new to it and has lots remaining to explore in it.

I'm stuck in a scenario.Please if anyone can guide me.

I need a sales report where i've a filter of Month and other filters.

The requirement is if i select a month from Month filter then i should generate three columns : "sum of Sales of selected month","sum of sales of selected month-1","sum of sales of selected month-2". for e.g., if i'll select march in the month filter, i should have  three columns "Sum of Sales of March","Sum of Sales of February","Sum of Sales of January".

This three columns generation should be based on selection of month.

Please help me in doing this.

How can i achieve this ?

Thanks in advacndce...

1 ACCEPTED SOLUTION
alexei7
Continued Contributor
Continued Contributor

Hi Priyanka,

 

I think what you want to do is to create three measures:

 

#1 sum of sales

#2 sum of sales from month-1

#3 sum of sales from month-2

 

You could then put "month" as a field in the Power BI table and each of these three measures.

 

#1 should be quite easy to do using the SUM function

#2 and #3 - it'd be best to use CALCULATE with PARALLELPERIOD

 

Hope that helps get you started!

 

Alex

View solution in original post

1 REPLY 1
alexei7
Continued Contributor
Continued Contributor

Hi Priyanka,

 

I think what you want to do is to create three measures:

 

#1 sum of sales

#2 sum of sales from month-1

#3 sum of sales from month-2

 

You could then put "month" as a field in the Power BI table and each of these three measures.

 

#1 should be quite easy to do using the SUM function

#2 and #3 - it'd be best to use CALCULATE with PARALLELPERIOD

 

Hope that helps get you started!

 

Alex

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.