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
Anonymous
Not applicable

Using Multiple If or switch in Measures

Hi ,

I have a list of record in one table which is associated with different school for example like this:

School            TeacherperStudent    Date 

RV                        100                         1 Jan
Loyola                  150                         1 Jan
Convent               270                         1 Jan

RV                        120                         2 Jan

Loyola                  140                         2 Jan

DBMS                   700                         1 Jan

 

and another table where I have Target for each school like:

School        Target
RV                  110

Loyola            120

Convent         200

DBMS             70

 

I need to check if on dats if the Teacherperstudent has crossed the target or not and accordingly i want to highlight it in color.

The best approach will be to create a measure which will record 1 or 0 whenever school is within target or outside the target and based on the target I can apply conditional formatting.

I would like to take some help on the measure. I created calculated coloumn but not able to create measure. Measure is required because conditional formatting wont work without Measure.

Please let me know what will be formulae for this. how can i use switch in Measure.

Thanks.

Ankku

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

You can create a measure below:

WithinTarget = IF(SUM(Table1[TecherperStudent])-SUM(Table2[Target])<=0,1,0)

 

Then you can set the Conditional Formatting for the column TeacherperStudent. For more information, see attached report. 

q2.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

You can create a measure below:

WithinTarget = IF(SUM(Table1[TecherperStudent])-SUM(Table2[Target])<=0,1,0)

 

Then you can set the Conditional Formatting for the column TeacherperStudent. For more information, see attached report. 

q2.PNG

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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