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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
kris1989
Regular Visitor

If statement or something that will help!

Hi in need of some assistance.

 

I need a code (first thing that comes to mind is an if statement) for the following:

IF total expenditure = $5000000 and below "low risk", IF total expenditure = $5000001 - $10000000, "Medium Risk", IF total expenditure = $10000001+, "High Risk"

 

The Power Bi visualisation being used is a card and I need it linked to another card that displays the total expenditure in a report.

 

Thanks!!

1 ACCEPTED SOLUTION

@kris1989

 

Just need to use a card with states--this is a custom visual.

 

You can download from here.

 

https://app.powerbi.com/visuals/

 

I attach a sample of your case:

 

Sample




Lima - Peru

View solution in original post

3 REPLIES 3
Vvelarde
Community Champion
Community Champion

@kris1989

 

Hi, Create a Measure

 

 

Risk_State =
IF (
    SUM ( 'TableName'[Expenditure] ) < 5000000,
    "low risk",
    IF (
        SUM ( 'TableName'[Expenditure] ) < 10000000,
        "Medium Risk",
        "High Risk"
    )
)



Lima - Peru

@Vvelarde

 

G'day mate,

 

That worked but I gave you the wrong instructions my apologies. Here is how i'd like my report to work:

- I have two page slicers, one for the financial year change and the other for "On Contract Spend" and "Off Contract Spend".

- I have the following cards:

Card 1 Total Spend (column is expenditure)

Card 2 Spend Off Contract (column is expenditure with an additional filter of Off and On Contract column)

Card 3 Risk Rating Low $5mil and below, Med $10mil to $5mil and High $10mil+. I would like this to be linked somehow just to card 2 if possible.

 

Would even be cooler if I could change colours ie low risk is green, med risk is orange and high is red.

 

Thanks for your help!!

@kris1989

 

Just need to use a card with states--this is a custom visual.

 

You can download from here.

 

https://app.powerbi.com/visuals/

 

I attach a sample of your case:

 

Sample




Lima - Peru

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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