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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
G23
Frequent Visitor

Calculating Growth Based on Multiple or Single Year Chicklet Selection

Hello,

 

I've been trying to wrap my head around how to go about building a measure based on selectedvalue to calculate year over year growth. I have a chicklet slicer with selections for fiscal years 20, 21, & 22. I want to calculate revenue growth ($) on a Card that will change based on the chicklet selections, which is a multi-select.

If FY20 and FY22 are selected, the card will show (FY22 - FY20) revenue.
If FY20, FY21, AND FY22 are selected, the card will show (FY22-20) revenue.

If no options are selected, the card should show (FY22-20) revenue.
If FY21 is selected, card will show FY21 revenue.
etc...

 

Appreciate any help!

 

G23

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

I think you can cover all the scenarios by just looking at the max and min FY selected.

RevGrowth =
VAR MinFY = MIN ( Dim_Date[FiscalYear] )
VAR MaxFY = MAX ( Dim_Date[FiscalYear] )
VAR RevMinFY = CALCULATE ( [Revenue], TREATAS ( { MinFY }, Dim_Date[FiscalYear] ) )
VAR RevMaxFY = CALCULATE ( [Revenue], TREATAS ( { MaxFY }, Dim_Date[FiscalYear] ) )
RETURN
    IF ( MinFY = MaxFY, RevMaxFY, RevMaxFY - RevMinFY )

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

I think you can cover all the scenarios by just looking at the max and min FY selected.

RevGrowth =
VAR MinFY = MIN ( Dim_Date[FiscalYear] )
VAR MaxFY = MAX ( Dim_Date[FiscalYear] )
VAR RevMinFY = CALCULATE ( [Revenue], TREATAS ( { MinFY }, Dim_Date[FiscalYear] ) )
VAR RevMaxFY = CALCULATE ( [Revenue], TREATAS ( { MaxFY }, Dim_Date[FiscalYear] ) )
RETURN
    IF ( MinFY = MaxFY, RevMaxFY, RevMaxFY - RevMinFY )
vanessafvg
Super User
Super User

you could probably use concatenex combining your fiscal year values

doing somethink like this 

create measure

year value =
IF (
ISFILTERED ( data[year] ),
CALCULATE ( CONCATENATEX ( VALUES ( data[year] ), data[year], "," ) ),
BLANK ()
)
and then write a switch statement
whichyear =
SWITCH (
TRUE (),
[year value] = "2020", [FY20],
[year value] = "2021", [FY21],
[year value] = "2020,2021", [FY22-20],
[FY22-20]
)




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors