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
refint650
Helper III
Helper III

ISfiltered calculations based on year slicer

Hello All

 

I'm displaying KPI metric(Totalcost)in card visual and is filtered by Year slicers, by default card visual shows total cost for all years.

I also have two measures 

1) Total cost for current financial year(2024 March -2025 april)

2) Total cost for Prior financ year (2023 march -2024 april)

 

Users want to display current year total cost when no slicers value is selected, else show seleccted year total cost.

refint650_0-1729881606874.png

 

how can i achieve this functionality .

 

Thanks

Rf

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @refint650 

 

Thank you very much dlopesc04 for your prompt reply.

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1730084475470.png

 

Create a measure.

 

Total Cost = 
IF(
    ISFILTERED('Table'[Year]),
    CALCULATE(
        SUM('Table'[Cost]),
        'Table'[Year] = MAX('Table'[Year])
    ),
    CALCULATE(
        SUM('Table'[Cost]),
        'Table'[Year] = YEAR(TODAY())
    )
)

 

Here is the result.

 

vnuocmsft_1-1730084519554.png

 

vnuocmsft_2-1730084535923.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @refint650 

 

Thank you very much dlopesc04 for your prompt reply.

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1730084475470.png

 

Create a measure.

 

Total Cost = 
IF(
    ISFILTERED('Table'[Year]),
    CALCULATE(
        SUM('Table'[Cost]),
        'Table'[Year] = MAX('Table'[Year])
    ),
    CALCULATE(
        SUM('Table'[Cost]),
        'Table'[Year] = YEAR(TODAY())
    )
)

 

Here is the result.

 

vnuocmsft_1-1730084519554.png

 

vnuocmsft_2-1730084535923.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

dlopesc04
Resolver II
Resolver II

Try something like this:
Sum_TotalCost =  IF(ISFILTERED('Table'[FiscalYear]), SUM(TotalCost), [YourCurrentYearMeasure])
I'm assuming this year slicer has a relationship to your fact table for the sum to work, let me know if this does the trick.

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!

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