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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Timo1980
Advocate I
Advocate I

Changing part of measure based on slicer selection

Hi All,

 

I'm wondering if the following in possible. In the example table below I would like to change the Indexed calculation based on a different Index selection based on a slicer input, in the front end of power BI. The table should remain the same but basicly change the indexed calculation if for example i would select month 1(jan) as the index, so line would then change to 100% etc.  any help would be greatly appreciated!

 

 

Month ASPIndexIndexed 
1180 98% 
2176176100% 
3178 99% 
4176 100% 
5180 98% 
6174 101% 
7173 102% 
8179 99% 
9174 101% 
10173 102% 
11175 101% 
12176 100% 
 Measure=SUMX(Sales)/SUMX(Volume)Same Measure as ASP, but called indexMeasure=INDEX/ASP<-- Change index value based on slicer

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Timo1980 ,

 

Create a table with month/year format to use as your filter then add the following measure:

Indexed = 
VAR Index =
    CALCULATE (
        SUM ( Sales[ASP] );
        FILTER (
            ALL ( Sales[Month ] );
            Sales[Month ] = MIN ( 'Base:_Month'[Base Month] )
        )
    )
RETURN
    Index / SUM ( Sales[ASP] )

Replace the Sum(SALES[ASP]) by your ASP measure 

 

Then just use the slicer for changing the base values.

 

this calcultion may need a lot of adjustments for your model but the tought process is this one.

 

Check PBIX file attach


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

Check if this can help. You can have two measures and switch

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

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
MFelix
Super User
Super User

Hi @Timo1980 ,

 

Create a table with month/year format to use as your filter then add the following measure:

Indexed = 
VAR Index =
    CALCULATE (
        SUM ( Sales[ASP] );
        FILTER (
            ALL ( Sales[Month ] );
            Sales[Month ] = MIN ( 'Base:_Month'[Base Month] )
        )
    )
RETURN
    Index / SUM ( Sales[ASP] )

Replace the Sum(SALES[ASP]) by your ASP measure 

 

Then just use the slicer for changing the base values.

 

this calcultion may need a lot of adjustments for your model but the tought process is this one.

 

Check PBIX file attach


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



This works like a charm, thanks! learn something new here everyday

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors