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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

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
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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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