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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NelsonPay
Regular 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.