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
kldefens
Frequent Visitor

How to create a measure with an if condition

hi guys,

I want to create a measure that multiplies column "C&OCalaculate" with 100 if Column "VullingtotaalPerc" = "100 %".

 

the measure should look something like this: if Column "VullingtotaalPerc" = "100%" then multiply Column "C&OCaluculate" with 100 + 

if Column "VullingtotaalPerc" = "40%" then multiply Column "C&OCaluculate" with 40 and so on.

 

I've tried to use the If-statement but I can't choose any columns because they are not a measure (??)


thnx guys!!

 

 

A4E90C66-29FB-483C-AB3D-7198F5B6E61D.png

2 REPLIES 2
Mahesh0016
Super User
Super User

Mahesh0016_0-1670844243958.png

Hello @kldefens ,
I hope Above solution is helpful for you!

Hi Mahesh,
This worked! Thank you so much, but now I've have another problem.
I can't figure out how to get the grand total.

 

I've created a measure called "IF_cond C&O-calculated". 
Example: This measure will multiply column "C&O-Calculated%" with 100 if the column "VullingTotaalPerc" is 100 %.
The measure is working fine but it won't show a grand total of percentage. 

Down below is the measure:

IF_cond C&O-calculated =
VAR valling = SELECTEDVALUE(MKA[VullingTotaalPerc])

RETURN
SWITCH(TRUE(),
valling= "100 %", MKA[C&O-Calculated%] * 1,
valling= "90 %", MKA[C&O-Calculated%] * 0.9,
valling= "80 %", MKA[C&O-Calculated%] * 0.8,
valling= "70 %", MKA[C&O-Calculated%] * 0.7,
valling= "60 %", MKA[C&O-Calculated%] * 0.6,
valling= "50 %", MKA[C&O-Calculated%] * 0.5,
valling= "40 %", MKA[C&O-Calculated%] * 0.4,
valling= "30 %", MKA[C&O-Calculated%] * 0.3,
valling= "20 %", MKA[C&O-Calculated%] * 0.2,
valling= "10 %", MKA[C&O-Calculated%] * 0.1

kldefens_0-1670870992144.png

 

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