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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
NelsonPay
Frequent Visitor

How to create a conditional

Good afternoon,

 

I have the following table

NelsonPay_0-1675285286376.png

I want to create a conditional in which if the total approved amount is more than 50 and is Dinner subtract 50(day limit dinner) if the value is less keep it 0 and if the total is more than 30 and is luch subtract 30(day limit luch) if the total is less kee ipt 0. I have the following formula:

 

IF('Global Meals'[Total Approved Amount USD]>=0.1,IF('Global Meals'[Total Approved Amount USD]>=20,'Global Meals'[Total Approved Amount USD]-[Day Limit Breakfast],IF('Global Meals'[Total Approved Amount USD]>=30,'Global Meals'[Total Approved Amount USD]-[Day Limit Luch],IF('Global Meals'[Total Approved Amount USD]>=50,'Global Meals'[Total Approved Amount USD]-[Day Limit Dinner],IF('Global Meals'[Total Approved Amount USD]>=10,'Global Meals'[Total Approved Amount USD]-[Day Limit Snacks],0)))))
 
How can calculate in a way each formula can be with each subtype.
 
Best regards,
Nelson Pay
1 REPLY 1
markeymark25
Regular Visitor

I would create a conditional column under "Add Column" in Power Query Editor.  

 

There you can spell out your conditions. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.